Question
I'm not familiar with the API and don't know how to write code. What can I use to perform requests with the Zendesk REST API?
Answer
Disclaimer: Postman is a 3rd party tool and is not supported or maintained by Zendesk. This article is provided for instructional purposes only.
We recommend Postman, a fully-featured app to make requests to APIs, edit parameters, and check responses.
To make an API request in Postman
- Download and install the Postman application. There is no need to sign up. Bypass any sign-up screen.
- Open the application.
- Authenticate your requests in the Authorization tab and select Basic Auth from the drop-down. Add your Zendesk username and password:
You can now make requests by copying-and-pasting API commands for your subdomain. Be sure to replace {{subdomain}} in all requests to ensure they work.
For a more detailed description of how to set up Postman to make Zendesk API requests, see the article: Exploring Zendesk APIs with Postman.
2 Comments
Hi Mark,
I can't seem to authenticate with the above solution nor obtain the API token.
The following error message occurs:
Ng Ching Hui make sure that you have the necessary permissions. Some APIs allow only admins to use them.
For the API credentials, this is what worked for me:
1. Generate an API token in the agent dashboard at Channels/API. Make sure to save the toke before saving it in the dashboard
2. The format for the credentials is <email_address>/token:<api_token>, base-64 encoded. Use the Chrome dev tools to do this. As an example, if the email address is user1@abc.com, and the API token os 1234ABCD, then in the console type btoa('user1@abc.com/token:ABCD1234'); The console will display the result
"dXNlcjFAYWJjLmNvbS90b2tlbjpBQkNEMTIzNA=="
3. In Postman, click the Headers tab. Under Key, type Authorization. Under Value, type Basic followed by a space follwed by the encoded credentials, so for this example it would be Basic dXNlcjFAYWJjLmNvbS90b2tlbjpBQkNEMTIzNA==
Hope this helps
Please sign in to leave a comment.