Recent searches


No recent searches

Zendesk sandbox instance fails to authenticate



Posted Aug 06, 2021

I have created a sandbox in our company's zendesk account. I am not the admin but the account that I used to create the sandbox has admin priviliges. I created API key in that sandbox. Then i tried curl command to hit the query api (api/v2/requests/search.json?query=) on the sandbox instance(obviously using the sandbox subdomain) but I am getting error "Could not authenticate you". If i hit the production instance with a production instance api, it works, which means my curl command syntax is correct.

What am i doing wrong? Can the sandbox instance be accessed via the api?

 


0

7

7 comments

image avatar

Eric Nelson

Zendesk Developer Advocacy

Hey there,

Can you confirm that token access is enabled in your sandbox? You'd be able to see this under channels > api in the admin settings.

Have a wonderful day!

Eric Nelson | Manager - Developer Advocacy

0


Hi Eric,

Thank you very much for responding. I almost lost hope that I would get a solution. Have had to resort to opening temporary accounts with trial period to test my changes.

Yes, token access is enabled for the sandbox instance. Here is the latest status: I am getting a 422 error if i use the sandbox subdomain and authentication details. However, if i use my other account's(the temporay ones that i have opened) subdomain and api token, i can successfully create ticket or create users in zendesk. Here is the response that I am getting:

Client error: `POST https://DUMMYDOMAIN.zendesk.com/api/v2/tickets.json` resulted in a `422 Unprocessable Entity` response: {"error":"RecordInvalid","description":"Record validation errors","details":{"submitter":[{"description":"Submitter is i (truncated...) [details] {"error":"RecordInvalid","description":"Record validation errors","details":{"submitter":[{"description":"Submitter is invalid","error":"InvalidValue"}],"base":[{"description":"Author is invalid"}],"requester":[{"description":"Requester: is invalid","error":"InvalidValue"}]}}

Can you please guide me to the right direction to resolve the issue?

Thanks,
Yeasir

0


image avatar

Eric Nelson

Zendesk Developer Advocacy

Hey Yeasir,

Mind if I move this into a ticket so I can get info specific to your sandbox? This will help me to be able to debug the issue.

Thanks!

Eric

1


Hello Eric,

Absolutely. Please let me know if you need any further details from my end.

Thankfully,
Yeasir

0


image avatar

Eric Nelson

Zendesk Developer Advocacy

Great thanks yeasir,

I've went ahead and opened a ticket on your behalf. Look forward to working with you via that!

Have a wonderful day!

Eric Nelson | Manager - Developer Advocacy

0


Hi there, I am having the same issue. Our sandbox instance is failing to authenticate. Was there a resolution?

0


Hi Nathania,

Yes I had this issue resolved. What is the response that you are receiving from the sandbox instance?

The sandbox instance is a different entity to the production instance. So the settings/data from production is not copied over to the sandbox instance, as I understood. Please make sure access using api key in sandbox is enabled.

In my case the issue was I was trying to create a zendesk ticket on behalf of one of our application customers but the sandbox instance could not find that person(i.e.; requester_id). Later we found out that it was happening because the id/person on behalf of whom I was trying to create the ticket  exists in our production(which was connected to zendesk prod) and I assumed it exists in zendesk sandbox instance as well. But as I mentioned above, that is not the case.

If this does not help, submit a support request with the request and response details and someone should help you out. I received prompt support.

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post