Rest API: Cannot Authenticate with Authorization headers
-
Hello,
I wasn’t able, making a simple request with Postman, to get it authorized
Here’s my request
POST /wp-json/wp/v2/posts/109441 HTTP/1.1 Host: xxxxxx Authorization: OAuth oauth_consumer_key=”xxxxxxx”,oauth_token=”xxxx”,oauth_signature_method=”HMAC-SHA1″,oauth_timestamp=”11234567″,oauth_nonce=”xxxxxx”,oauth_version=”1.0″,oauth_signature=”xxxxxxx” Cache-Control: no-cache Postman-Token: xxxxxx-xx0-40a8x8e8b-98fx1dex “{“title”:”New Post title”}” Response: headers: … Access-Control-Allow-Headers →Authorization … body: { “code”: “rest_cannot_edit”, “message”: “Sorry, you are not allowed to update this post.”, “data”: { “status”: 401 } }
[Moderator note: code fixed. Please wrap code in the backtick character or use the code button.]
Sending the same parameters as www-form results in a successful edit.
Any idea on how to make this work?
- The topic ‘Rest API: Cannot Authenticate with Authorization headers’ is closed to new replies.