No stream value when requesting a Deezer track through vanilla HTTP

For example issuing an HTTP GET on: https://api.deezer.com/track/3980888?access_token=xxx Where access_token is a valid Premium+ token. The response does not include a stream field. It is however included if (for example) using DeezerConnect and DeezerRequest from the Deezer Android SDK.

Upvotes: 1

Views: 717

Answers (1)

XGouchet
XGouchet

Reputation: 10203

To get a valid stream in the API response, you need to provide the access_token as you do, as well as an imei parameter.

This imei parameter is then used to decode the stream and play the track. Unfortunately, not all Android device have an IMEI number, so the Deezer SDK uses it's own way to generate this value.

That's why you really should use the DeezerConnect / DeezerRequest system to call the API, to be sure that you get a correct Stream.

Upvotes: 3

Related Questions