[RSS Feed/News] REST API read and get attachment

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
I want to get the attachment from a post, but it looks like that this is not working:

To get the attachment key
Code:

Code:
curl --header 'XF-Api-Key: KEYXYZ'
    --request POST http://localhost/api/attachments/new-key/ \
    --data type=post \
    --data context[post_id]=1234
Now try to get the attachment
Code:

Code:
curl --header 'XF-Api-Key: KEYXYZ' \
    --request GET http://localhost/api/attachments \
    --data key=GENERATED_KEY_FROM_ABOVE_COMMAND
This is the result:
Code:

HTTP/1.1 400 Bad Request...

Read more

ادامه مطلب...
 
Status
Not open for further replies.
Back
Top Bottom