cURL commands
Publication le 04 nov. 2021
I want to try test the Zendesk API’s using curl commands as per the example from the Zendesk DEVELOPERS website, but I don’t know our full URL address or the Authorization parameters to put into the curl command, can you assist.
0
3
3 commentaire
TONY HOGGAN EXT
Hi, I've found some examples for cURL that suggest using your Token from your Account, as below, but it still fails:
curl -v -X GET https://{my domain}.zendesk.com/v2/contacts\-H "Accept: application/json"\-H "Authorization:{my account name} {my API token}/"
The Authorisation seems to be OK (?) as I don't get any obvious 401 unauthorised msgs
But I do get quite a bit of logged response including the following:
* schannel: SSL/TLS handshake complete
* schannel: SSL/TLS connection with {my domain}.zendesk.com port 443 (step 3/3)
* schannel: stored credential handle in session cache
> GET /v2/contacts\-H HTTP/1.1
> Host: {my domain}.zendesk.com
> User-Agent: curl/7.55.1
> Accept: */*
I also get some advisories as well:
Note: Unnecessary use of -X or --request, GET is already inferred.
* Port number ended with ' '
* Closing connection -1
Any advice would be good to help me get the basic cURL submission working....?
Thx. T.
0
Liron Oren
OK, I need to know what values to use in the following curl example calling the contacts API.What do I use / how do I obtain the 2 Authorization parameters to be used in our curl command, ii.e. what do I put in place of Bearer and $ACCESS_TOKEN?
0
Greg Katechis
{subdomain}
placeholder with your Zendesk subdomain. As an example if you're Zendesk subdomain is applesandoranges, the url would begin withhttps://applesandoranges.zendesk.com
...
. For authorization, you likely will need to use your agent/admin credentials to make these API calls, but this will definitely depend on the specific calls you're making, so sharing the examples with us will let us give you the best answer!0
Vous connecter pour laisser un commentaire.