Bearer Token access 401 fail in Postman
Con risposta
Data ultimo post: 30 mag 2023
I created a new API token on the Zendesk API | Settings tab. In postman I set up authorization type Bearer Token with the token created in Zendesk.
Using a GET method to https://{my sub domain}.zendesk.com/api/v2/tickets/:ticket_id
Result:
{
"error": "invalid_token",
"error_description": "The access token provided is expired, revoked, malformed or invalid for other reasons."
}
The token is just minutes old. I was under the impression that they do not expire.

0
6
6 commenti
Etiene James
Thanks for the explanation.
0
Jerrold Patterson
When you use a Basic Authorization you encode the 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.
0
Etiene James
5759743106970 I ran into the same issue. Do you mind showing an example code on how you were able to resolve it? Thanks in anticipation.
0
Greg Katechis
0
Jerrold Patterson
The token is an API token and so I needed to change to Basic Auth and use a username myemail@email.com/token with the API token as the password.
0
Greg Katechis
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 (example here) to see if that resolves the issue for you?
0
Accedi per aggiungere un commento.