Error 'Couldn't authenticate you' in authorization process via API | Community
Skip to main content

Error 'Couldn't authenticate you' in authorization process via API

  • October 3, 2022
  • 2 replies
  • 0 views

I have my a Zendesk Chat App that has a search request.

Here is my code:

// Init the client 
const client = ZAFClient.init();

...

// Call the metadata first
client.metadata().then(function (metadata) {

...

const config = metadata.settings;

...

const myZendeskSupportSettings = {
type: "GET",
url: `https://mysomesite.zendesk.com/api/v2/search.json?query=type:user example@mail.com`,
headers: {
   "Authorization": `Basic ${config.my_zendeskd_suppport_token}` },
   dataType: "json"
  };

...

client.request(myZendeskSupportSettings).then((data) => {
// does not reach this place, an error appears
});

});

But when I try to make this request I get an error:

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


How to avoid this error?

2 replies

Greg29
  • October 4, 2022

Hi again Ruslan...I see that the other post that you had regarding authentication was made a few hours later. Are you still having these issues?


  • Author
  • October 4, 2022

No, you helped and answered in my previous ticket: https://support.zendesk.com/hc/en-us/community/posts/5001619133466-Using-Search-API-without-Authorization
Thanks again, Greg!