Zendesk API token authentication error. How to connect to API?

I am trying to connect to Zendesk API using a token, generated in Zendesk API settings, but I can't authenticate the request.

To connect, I am using:
Basic {email_address}/token:{api_token}

I am getting invalid token error:
{"error":"invalid_token","error_description":"The access token provided is expired, revoked, malformed or invalid for other reasons."}

How can I connect to Zendesk API ?
give a positive ratinggive a negative rating
21 Feb 2023 at 06:58 PM
First, you have to check if you are using valid API token. Then you have to put together Email address and API token, according to the format: {email_address}/token:{api_token}

so it should look like: email@example.com/token:abcde12345fghij67890klmno12345

and encode it to Base64 format:


Zendesk authentication via headers

Header name: Authorization
Header value: Basic ZW1haWxAZXhhbXBsZS5jb20vdG9rZW46YWJjZGUxMjM0NWZnaGlqNjc4OTBrbG1ubzEyMzQ1

To encode a string to Base64 format, you can use an online application.

You need to use Base64 encoding also in case of email and password authentication.
give a positive ratinggive a negative rating
16 Mar 2023 at 04:41 PM
Share on FacebookShare on TwitterShare on LinkedInSend email
2024 AnswerTabsTermsContact us