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

Keep having Unauthorized errors when i try to create/edit NPF post #6

Closed
poulp opened this issue May 16, 2019 · 1 comment
Closed

Comments

@poulp
Copy link

poulp commented May 16, 2019

I'm well authenticated with Oauth1, and when i try to create or edit a post using NPF api it keep respond me with an Unauthorized error

{
   "meta":{
      "status":401,
      "msg":"Unauthorized"
   },
   "response":[

   ],
   "errors":[
      {
         "title":"Unauthorized",
         "code":1016,
         "detail":"Unable to authorize"
      }
   ]
}

When I create a post using the legacy endpoint it work well, same things when I fetch a post using NPF api. But mysteriously it didn't work with creation. Is there anything I missed ?

@cyle
Copy link
Member

cyle commented May 17, 2019

hello @poulp , most likely that's because the signature generated for your OAuth1 token isn't what we expected. The NPF endpoints are some of the few of ours that require JSON in your request payload, which means properly setting your Content-Type: application/json, which sometimes causes bugs with OAuth1 signature creation, so it's likely a bug with whatever is generating that signature for your request.

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

2 participants