How to properly decompress .json.gz file for asynchronous endpoint



When I make a POST to the asynchronous stats endpoint, I am also now adding the header “Accept-encoding: gzip” for that post request. It said it was necessary only for requests made out to the asynch (POST) analytics endpoint All adding this header seemed to do I encode the response from the POST endpoint. So I decode the message and keep querying the GET 1/stats/jobs/accounts endpoint until I get the URL.

Now that I have the URL, how do I use this to get Twitter Ads stats data? My URL looks like[sensitive_info].json.gz


The file is delivered in a compressed format so for example on Unix environment gunzip can be used tip unzip the data and view it as JSON. There is probably a library to use for the language you are developing your solution in like zlib for Ruby. We are adding support for this to our SDKs soon so please keep an eye on and




Please note the issue presented here: V1 async reports missing required headers