Recent searches


No recent searches

ZCLI Basic Auth using secure settings



Posted Mar 19, 2025

I can't seem to get basic auth working. I already tried what's described in this article https://developer.zendesk.com/documentation/apps/app-developer-guide/making-api-requests-from-a-zendesk-app/#using-basic-access-authentication 
 

We use a token:token format for our basic auth and I think the issue is a restriction on secure settings in the basic_auth.username object.

var apiCall = {
                URL: url
                headers: {
                    "Authorization": "Basic {{basic_auth.token}}"},
                basic_auth: {
                    "username": "{{setting.api_token}}",
                    "password": "{{setting.api_token}}"
                },
                type: 'GET',
                secure: true
            };

 

Can someone help point out my mistake here? 


0

1

1 comment

image avatar

Tipene Hughes

Zendesk Developer Advocacy

Hi Gef,
 
Can you please share a screenshot of any errors that are appearing when you're running your code? That'll be helpful in narrowing down a cause here.
 
Thanks,
 
Tipene
 

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post