IbrahimIMC
Member
Hello,
I've been trying to figure out why I'm getting permission errors during a DELETE attachment API call.
The API user is the same as I've used to upload the attachments, and the attachments are attached to the post by posting the thread first, and using the first_post_id return data to include as the context[post_id] value. The user API permissions are also set to allow attachment delete, read, write, as well as permissions to delete, read, write the threads/posts. The only data being sent to the attachment endpoint is the DELETE request, the XF-Api-Key, and the id in the URL.
Any ideas what I need to include or am missing?
INFO:main: Deleting attachment ID 883084
INFO:main: Response status code: 403
INFO:main: Response content: b'{\n "errors": [\n {\n "code": "do_not_have_permission",\n "message": "You do not have permission to view this page or perform this action.",\n "params": []\n }\n ]\n}'
ERROR:main: An error occurred: 403 Client Error: Forbidden for url: https://tractorbynet.com/forums/api/attachments/883084
Thanks,
Ibrahim
I've been trying to figure out why I'm getting permission errors during a DELETE attachment API call.
The API user is the same as I've used to upload the attachments, and the attachments are attached to the post by posting the thread first, and using the first_post_id return data to include as the context[post_id] value. The user API permissions are also set to allow attachment delete, read, write, as well as permissions to delete, read, write the threads/posts. The only data being sent to the attachment endpoint is the DELETE request, the XF-Api-Key, and the id in the URL.
Any ideas what I need to include or am missing?
INFO:main: Deleting attachment ID 883084
INFO:main: Response status code: 403
INFO:main: Response content: b'{\n "errors": [\n {\n "code": "do_not_have_permission",\n "message": "You do not have permission to view this page or perform this action.",\n "params": []\n }\n ]\n}'
ERROR:main: An error occurred: 403 Client Error: Forbidden for url: https://tractorbynet.com/forums/api/attachments/883084
Thanks,
Ibrahim