POST https://{URL}.zendesk.com/api/v2/tickets.json net::ERR_ABORTED 401



Posted Mar 10, 2022

Hello, I am attempting to POST a ticket to our ticket queue using the Zendesk API. I keep receiving a 401 error with minimal feedback as to what the issue could be.

async function postData(url: string, data: object) {
constresponse=awaitfetch(url, {
method: 'POST',
mode: 'no-cors',
body: JSON.stringify(data),
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Basic {BASE64EMAIL/PASSWORD}'
}
});
}
I have been able to get the username and password to work over curl as well as the email and an API token.

0

1

1 comment

Hey Mitchell,

Would you mind if we move this into a ticket so we can pull logs? Thanks!

0


Sign in to leave a comment.

Didn't find what you're looking for?

New post