Fullmental
Active member
I don't get this. I am using a super user key for the API with full privileges, and I've tried an admin key with all scopes allowed. I run a delete request on an attachment ID I know exists, and the response I get is a 405 error. That makes no sense. There's literally nothing I should be doing with the API other than the request and the headers which include the super user key and the "application/x-www-form-urlencoded" content type as directed in the endpoint documentation. I don't see how I can possibly get this one wrong, there's literally nothing else to do in the request:
Code:
Output:
Why? All the other API calls I make work just fine. This one is the only one I've tried that doesn't work.
Code:
Code:
import requests
import json
HEADER = {'XF-Api-Key':'<REDACTED>', 'application/x-www-form-urlencoded'}
r = requests.delete("https://example.com/api/attachments/1", headers = HEADER)
print(r)
Output:
<Response [405]>
Why? All the other API calls I make work just fine. This one is the only one I've tried that doesn't work.
Last edited: