Spotify gives corrupted data in HTTP Toolkit

I’m trying to watch spotify packages on the emulator, but the data sent and received are corrupted. How can I solve this problem?


enter image description here
enter image description here
enter image description here

I tried reading the data many times but it always looks like this. I want to see the data properly in JSON form.

>Solution :

This data is not corrupted, it’s just not in the format you want.

You can see the format by looking at the content-type header, which says application/protobuf.

This is not JSON data. Instead it’s Protobuf, which is a general-purpose serialization format, similar to JSON or XML, but designed to be faster to process and smaller to transfer, in part by being sent as raw binary data, instead of readable strings.

To deserialize this 100% correctly, you will need the Protobuf schema for the API you’re talking to (a .proto file). In many cases, unless this is your own or a publicly documented API, that’s not going to be available.

You can still try to decode the data into raw data types though, although that might not allow you to decode all information immediately. There’s more info on that here: raw decoder for protobufs format. Decoding data like this works best using the protoc command-line tool, but you may also be able to decode this data using Note that that takes hex data, not a raw string like you have here, so you’ll have to pick the ‘Hex’ option for the body in HTTP Toolkit to copy the hex codes over instead.

Leave a Reply