XF 2.2 XenForo Rest API for Uploading Images

Domain

Member
I can post the thread via API, but I can't upload the image

Dear XenForo Support Team,

I'm trying to follow the API documentation for the "Uploads an attachment" and "Creates a new attachment key" endpoints. However, I'm still getting some errors, such as "Required input missing: type" when trying to create the attachment key.

Could you please provide me with some sample code or step-by-step instructions on how to properly use the XenForo API to upload images and associate them with forum posts?

Thank you in advance for your help.
 
I can post the thread via API, but I can't upload the image

Dear XenForo Support Team,

I'm trying to follow the API documentation for the "Uploads an attachment" and "Creates a new attachment key" endpoints. However, I'm still getting some errors, such as "Required input missing: type" when trying to create the attachment key.

Could you please provide me with some sample code or step-by-step instructions on how to properly use the XenForo API to upload images and associate them with forum posts?

Thank you in advance for your help.
Hi,
Have you figured this out?
I'm stuck with the context parameter

Edit: Just got it now :D the type is the content type.
context is passed as (for example):
key: context[category_id]
value: 2
 
Last edited:
Back
Top Bottom