Forum Discussion
perk
Adept
Hi Yuri, thanks for your help. Are you adding the parameters Authorization: Bearer SOME_TOKEN_WE_HAVE to the request?
Can we add mulitple headers into the request? E.g. adding a "Content-type ?" It is strange though we will need a content-type set for a get request.
Interestingly the request works fine in curl
curl "https://domain.zendesk.com/api/v2/users?query=user@company.com" -H "Authorization: Bearer token" -v
which translates to:
> GET /api/v2/users?query=user@company.com HTTP/1.1
> User-Agent: curl/7.37.1
> Host: domain.zendesk.com
> Accept: */*
> Authorization: Bearer TOKEN
perk
10 years agoAdept
I added content type and I am getting success:
<#assign response_user_no_json = http.client.request(url_getUser).header("Authorization", "Bearer "+ response.content.access_token).header("Content-type", "application/json").json().get() />
Related Content
- 5 years ago
- 5 years ago