[GH-ISSUE #307] user id's are not URL percent encoded #176

Closed
opened 2026-02-27 23:21:13 +03:00 by kerem · 7 comments
Owner

Originally created by @william-reed on GitHub (Jul 3, 2018).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/307

user id's are not URL encoded and results in some 404 errors when usernames contain symbols. Can be solved simply by using urllib.parser.quote but it seems this repository is no longer updated so I am posting this more as a public service announcement than anything else.

Originally created by @william-reed on GitHub (Jul 3, 2018). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/307 user id's are not URL encoded and results in some 404 errors when usernames contain symbols. Can be solved simply by using `urllib.parser.quote` but it seems this repository is no longer updated so I am posting this more as a public service announcement than anything else.
kerem 2026-02-27 23:21:13 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@stephanebruckert commented on GitHub (Jan 12, 2020):

To review https://github.com/plamere/spotipy/pull/350/

<!-- gh-comment-id:573405501 --> @stephanebruckert commented on GitHub (Jan 12, 2020): To review https://github.com/plamere/spotipy/pull/350/
Author
Owner

@MaZderMind commented on GitHub (Jan 22, 2020):

This can be easily triggered by using the E-Mail-Address as Username, which works for all calls that do not pass the username as an argument.

<!-- gh-comment-id:577094776 --> @MaZderMind commented on GitHub (Jan 22, 2020): This can be easily triggered by using the E-Mail-Address as Username, which works for all calls that do not pass the username as an argument.
Author
Owner

@ritiek commented on GitHub (Jan 23, 2020):

It'd be nice if someone can provide an example method where this issue can be replicated. I tried passing username and email address to sp.user(), but it seems to fail for email address both with or without percent encoding. I'm probably doing something wrong I think.

<!-- gh-comment-id:577789793 --> @ritiek commented on GitHub (Jan 23, 2020): It'd be nice if someone can provide an example method where this issue can be replicated. I tried passing username and email address to `sp.user()`, but it seems to fail for email address both with or without percent encoding. I'm probably doing something wrong I think.
Author
Owner

@MaZderMind commented on GitHub (Jan 23, 2020):

I triggered it by running the test-suite with an email-address as username.

<!-- gh-comment-id:577796727 --> @MaZderMind commented on GitHub (Jan 23, 2020): I triggered it by running the test-suite with an email-address as username.
Author
Owner

@ghost commented on GitHub (Apr 14, 2020):

Taking a look at the Spotify API itself, it states that the parameter to the users endpoint must be an userid, so I guess that the email-address will not work even with the encoding.
For the usernames I will try to make an pull request to fix this as soon as I found an userid that contains special characters to test with.

<!-- gh-comment-id:613178792 --> @ghost commented on GitHub (Apr 14, 2020): Taking a look at the Spotify API itself, it states that the parameter to the users endpoint must be an userid, so I guess that the email-address will not work even with the encoding. For the usernames I will try to make an pull request to fix this as soon as I found an userid that contains special characters to test with.
Author
Owner

@stephanebruckert commented on GitHub (Apr 15, 2020):

@Bressan09 thanks! Also note that there is https://github.com/plamere/spotipy/pull/350, what do you think of it? I am not sure myself in what scenario this is needed

<!-- gh-comment-id:614051559 --> @stephanebruckert commented on GitHub (Apr 15, 2020): @Bressan09 thanks! Also note that there is https://github.com/plamere/spotipy/pull/350, what do you think of it? I am not sure myself in what scenario this is needed
Author
Owner

@stephanebruckert commented on GitHub (Jun 14, 2020):

Closing this as I don't think Spotify allows emails as possible usernames anymore

<!-- gh-comment-id:643795805 --> @stephanebruckert commented on GitHub (Jun 14, 2020): Closing this as I don't think Spotify allows emails as possible usernames anymore
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotipy#176
No description provided.