Recent searches
No recent searches
Zendesk Api Integration
Posted Sep 14, 2022
Basically i installed a package name 'zendesk/zendesk_api_client_php' in my laravel application and using this package i want to make get request on tickets module in zendesk and access some tickets from zendesk api so for this purpose i also have enables password and APIToken and have added credentials in my app so when i make request from postman i got this error. Client error: `https://zendesk.com/api/v2/tickets.json` resulted in a `404 Not Found` response can anyone plz suggest how to get rid of this error?
0
9
9 comments
Jack
Hi Ameer,
By the looks of it you are missing a subdomain, you cannot call https://zendesk.com directly, it needs to be a zendesk instance for example https://myzendesksubdomain.zendesk.com/api/v2/tickets would work fine providing your credentials are correct.
0
Ameer Hamza
Thanks Jack for your valuable suggestion but now i have also added subdomain correctly as well as other credentials like username and token but it giving now this error. Client error: `GET https://cloudrepia.zendesk.com/api/v2/tickets.json` resulted in a `401 Unauthorized` response:\n{\"error\":\"Couldn't authenticate you\"}\n [details] {\"error\":\"Couldn't authenticate you\"}"
0
Jack
That is a step in the right direction, your credentials need to be in this format:
so as an example:
It also needs to be a base64 encoded string.
I hope this helps!
0
Ameer Hamza
can you please share any example or a reference so it would very beneficial for me?
0
Jack
Ah apologies I misread that you are using the php library, I think to set up credentials properly you want to have something like this:
You can find the full documentation for the library you are using here
0
Ameer Hamza
yeah i am using php library and i am actually doing exact scenario as you mentioned above but still it is giving same authorization error.
0
Jack
I know it sounds silly but have you checked the API token and email combo you are using? Make sure to generate a new API token via the admin centre and copy / paste it to double check.
0
Ameer Hamza
yeah jack i also have checked this too by the way thank you so much for your guidance let me see further how it can be sort out.
0
Atul Upadhyay
The user id should be <email id>/token
example - first.last@gmail.com/token
0