Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Authenticate with Authorization headers #192

Open
salami-art opened this issue Jan 6, 2017 · 0 comments
Open

Cannot Authenticate with Authorization headers #192

salami-art opened this issue Jan 6, 2017 · 0 comments

Comments

@salami-art
Copy link

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
}
}

Sending the same parameters as www-form results in a successful edit.

What am I missing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant