Reputation: 69
I noticed that I get a different response to the Deezer API album chart request when a valid access token is included in the request. Without access token I get the full results, but with it, I only get the first 14 results. Also, those 14 results don't match the first results of the full results.
Request without access token (using HTTPie):
http 'https://api.deezer.com/chart/462/albums'
Response:
{
...
"next": "https://api.deezer.com/chart/462/albums?index=10",
"total": 300
}
Request with access token (using HTTPie):
http 'https://api.deezer.com/chart/462/albums?access_token=frK...'
Response:
{
...
"next": "https://api.deezer.com/chart/462/albums?access_token=frK...&index=10",
"total": 14
}
So are the album chart results filtered according to the requesting user? If so, how and why? Is there any way to get unfiltered results using the Deezer JavaScript SDK DZ.api
call (that automatically adds the access token)?
Upvotes: 0
Views: 629
Reputation: 950
Actually, the token, as you should know, allows to identify the user. The rights (from the country, the label, the account...) according to the track are read in order to filter the availability of the tracks, that's why you can have different results with or without a token, even with 2 different tokens.
You can use DZ.api without login, so you will have only the results according to the current country. It adds automatically the token only if you're logged.
Upvotes: 0