最近搜索
没有最近搜索
Issue authenticating to Tymeshift's EAP API
已于 2024年4月04日 发布
We're exploring using the WFM EAP API to get some reports into our data warehouse, but hitting the reports endpoint throws back a 401 JWT not found error.
- The endpoint I'm hitting is in the following format:
https://[domain_name].zendesk.com/wfm/public/api/v1/reports/[report_id]/data?endTime=1711401569&startTime=1710710367
- We're using an API token generated in Zendesk
What could be the issue here?
0
1
1 条评论
Samanta Velho
Hi Mohamed,
The 401 error you're encountering typically relates to issues with the Authorization header's format. Here's how it should be structured:
bash
Authorization: Basic $TOKEN
Where $TOKEN is the base64-encoded version of your email and API token from Zendesk, formatted as follows:
bash
$TOKEN = base64({email}/token:{api_token_generated_in_zendesk})
For example, if my email is samanta.velho@zendesk.com and my mock API token is JJlgENbrGxV6XPzPLvBvvK7wQoiu3evjsKK5rlTL, the string to encode would be:
scss
samanta.velho@zendesk.com/token:JJlgENbrGxV6XPzPLvBvvK7wQoiu3evjsKK5rlTL
After encoding this string in base64, you’ll get your final $TOKEN:
base-64-encoded example:
c2FtYW50YS52ZWxob0B6ZW5kZXNrLmNvbS90b2tlbjpKSmxnRU5ickd4VjZYUHpQTHZCdnZLN3dRb2l1M2V2anNLSzVybFRM
This is the $TOKEN you should use in the Authorization header. Remember, the token provided here is just an example and not real.
Don't worry, the provided token is a mock example for illustrative purposes.
Hope this helps!
Regards,
0