Authentication response returns garbled body


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?


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

 before you print_r.


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.


Thanks Sleeper. Decompressing as suggested by Taylor worked.


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