Announcements
The Spotify Stars Program: Celebrating Values Week!

Help Wizard

Step 1

NEXT STEP

Inconsistencies with resources that have hashes (like user ID a#a)

Inconsistencies with resources that have hashes (like user ID a#a)

Hi, in a recent GitHub issue I was made aware that user IDs may contain hashes, and that when retrieving user information or e.g. playlists, one should URL-encode that hash to avoid passing it in as HTML id, which is stripped by the server. In the case of user "a#a" not encoding would lead to retrieving the user with ID "a". A similar stripping happens with categories too (e.g. "holidays#whatever" -> "holidays"), which is understandable and possibly even out of your control.

 

This leads to the inconsistency. Retrieving the encoded user ID returns ID "a#a" but a URI "spotify:user:a%23a". Passing them back to the API would naturally yield different results. I would have hoped that everything returned by the API is either encoded or not. So is this intended?

 

Additionally, what are the characters that are safe to pass unencoded? Are hashes the only characters to cause trouble?

Reply
0 Replies

Suggested posts