Authentication response returns garbled body


#1

Hi , I am making an Application-only authentication POST request using the Consumer key and private for Search API, The response received has status 200 OK. But the response body that should contain the bearer tokens appears garbled . What might be the reason for this? Do I need to decode it or something?


#2

can you post some of the response on here? are you echoing a

 before you print_r.

#3

If the response is “garbled” it likely means you asked for a Gzip compressed response but then aren’t decompressing the response once you get it.


#4

Thanks Sleeper. Decompressing as suggested by Taylor worked.


#5

Thanks Taylor ! I decompressed the gzip stream to get the bearer token.
Thanks a lot. Please mention it somewhere in the documentation.