Bearer Token access 401 fail in Postman

Répondu

6 Commentaires

  • Greg Katechis
    亚博ZendeskDeveloper Advocacy

    Hi Jerrold! It's difficult to say what the cause may be with the information that you shared, but it's possible that there is something different that Postman does when using the authorization option like this. Could you instead add the bearer token directly to the headers (examplehere) to see if that resolves the issue for you?

    0
  • Jerrold Patterson

    The token is an API token and so I needed to change to Basic Auth and use a usernamemyemail@email.com/token with the API token as the password.

    0
  • Greg Katechis
    亚博ZendeskDeveloper Advocacy
    Ah yeah, that'll do it...thanks for the update and glad you're sorted now.
    0
  • Etiene James

    Jerrold PattersonI ran into the same issue. Do you mind showing an example code on how you were able to resolve it? Thanks in anticipation.

    0
  • Jerrold Patterson

    When you use a Basic Authorization you encode the email_address:password

    Authorization: Basic {base-64-encoded email_address:password}

    When using an API token, you replace the password with the token. It is like a magic password that works with any user account/email address, so be careful. The other issue is to ensure the user account has the correct role/access to accomplish what you want in the API call.

    Authorization: Basic {base-64-encoded email_address:API Token}
    0
  • Etiene James

    Thanks for the explanation.

    0

Vous devezvous connecter把联合国commentaire自由。

Réalisé par Zendesk