Recent searches


No recent searches

Nick Bolton's Avatar

Nick Bolton

Joined May 07, 2022

·

Last activity May 08, 2022

Following

0

Followers

0

Total activity

5

Votes

0

Subscriptions

2

ACTIVITY OVERVIEW

Latest activity by Nick Bolton

Nick Bolton commented,

Community comment Developer - Zendesk APIs

Ok, decided to use a Cloudflare worker so I could add some logic in between the Zendesk "loopback" API call. After a little bit of playing with tokens managed to get it working.

I didn't have any luck with Zendesk OAuth tokens in Cloudflare, but came across this in the API docs in relation to the regular API tokens (i.e. not OAuth):

Use the following format for the credentials:

{email_address}/token:{api_token}

Example:

jdoe@example.com/token:6wiIBWbGkBMo1mRDMuVwkw1EPsNkeUj95PIz2akv

After base64-encoding the resulting string, add it to the Authorization header as follows:

Authorization: Basic amRvZUBleGFtcGxlLmNvbS90b2tlbjo2d2lJQldiR2tCTW8xbVJETXVWd2t3MUVQc05rZVVqOTVQSXoyYWt2

Here's the command that I used on Mac to Base-64 encode my token.

echo -n 'foo@bar.com/token:abc123' | base64

View comment · Posted May 08, 2022 · Nick Bolton

0

Followers

0

Votes

0

Comments


Nick Bolton commented,

CommentAPI and SDK

Please make it clearer on this page that you have to Base-64 encode the token. Here's the command that I used on Mac to Base-64 encode my token.

echo -n 'foo@bar.com/token:abc123' | base64

View comment · Posted May 08, 2022 · Nick Bolton

0

Followers

4

Votes

0

Comments


Nick Bolton commented,

Community comment Developer - Zendesk APIs

Hi, using the API via a webhook is a nice idea. I appreciate that it isn't officially supported, but it's a good workaround. However, when I use the Bearer token with a token that I generated from the API page on the Zendesk admin, I get an error...

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

I'll keep trying, but I figured someone else might have this issue too, so worth mentioning.

Edit: Tried using both an API token (Token access) and OAuth token. Both seem to yield the same error.

Edit 2: Based on the article 'How can I authenticate API requests?' I also tried using Basic authentication, with my Zendesk email as the username and the token as the password, but this gives me the error:

{"error":"Couldn't authenticate you"}

View comment · Edited May 08, 2022 · Nick Bolton

0

Followers

0

Votes

0

Comments