other-emeraldβ’2y ago
zendesk
I'm fairly new to Voiceflow, but managed to make the Google Sheets API work, I'm struggling with the Zendesk API now, it sends back a 401 (authentication) error, although I copied the API block directly from the "Retail Purchases (webchat)" sample.
Yes, both "Content-Type": "application/json" and "Authorization": "Basic <space><API Key>" are in the "Headers", and the API key has been set up and pasted into the header.
In Zendesk, both Password Access and Token Access are enabled and we have other APIs working. Any idea what's happening?
4 Replies
Based on the information you've provided, it seems like you've correctly set up the headers for the API request. However, the 401 error you're encountering typically indicates an issue with authorization.
In the context of Zendesk, the "Authorization" header should be formatted as "Basic " followed by the Base64-encoded string of your email concatenated with "/token:" and your API token. For example, if your email is "user@example.com" and your API token is "123456", the string to encode would be "user@example.com/token:123456".
Please ensure that you're using the correct format for the "Authorization" header. If you're still encountering issues, it might be helpful to double-check the API token you're using.
Also, remember that each agent in Voiceflow has its own API key. You will need this if you are using our APIs to launch to production. You can find this key in the Integrations section of your Assistant project.
Sources:
- Voiceflow Developer Documentation
- Zendesk API Documentation
other-emeraldOPβ’2y ago
I'm using the correct format.
FYI - I went to the make.com handover, that works. It's a pitty, it would have been better if there were no auth. problems with the direct connection.
It took me 1 day to figure this out, the problem was, that I did not encode the email and the /token: plus the API Token to base64. In case anybody wonders who never worked with Base64 before. π
You should listen to Tico next time π
other-emeraldOPβ’2y ago
I should. π I could just not understand what it means by "followed by the Base64-encoded string of your email concatenated with "/token:" - I thought the token is already concatenated or something. π Never deal with humans.
We can be so stupid.