mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-26 16:15:51 +03:00
[GH-ISSUE #552] All queries return 404 "non existing id" #331
Labels
No labels
api-bug
bug
dependencies
documentation
duplicate
enhancement
external-ide
headless-mode
implicit-grant-flow
invalid
missing-endpoint
pr-welcome
private-api
pull-request
question
spotipy3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotipy#331
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ciferkey on GitHub (Jul 30, 2020).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/552
Describe the bug
Authenticated using client_id and client secret.
All endpoints return either 404 "non existing id" for single item queries like artist or empty lists of results for queries like search.
Your code
Expected behavior
Should return a result for a valid query ID.
Output
Environment:
Additional context
I've tried a variety of endpoints and they all seem to fail in the same way.
@felix-hilden commented on GitHub (Aug 2, 2020):
The resource is in URL form, not URI. Could you try e.g.
spotify:show:71mvGXupfKcmO6jlmOJQTP?Although, looking at the source it seems that URLs should be accepted too.
@ciferkey commented on GitHub (Aug 4, 2020):
@felix-hilden Correct docs say you can supply "show_id - the show ID, URI or URL". The specific example is a URL but I've tried all they and they behaved the same way.
@ciferkey commented on GitHub (Aug 5, 2020):
The plot thickens. Seems other users are having issues with the shows endpoint: https://community.spotify.com/t5/Spotify-for-Developers/Searching-for-podcasts-not-returning-results/m-p/4973209#M429
@ciferkey commented on GitHub (Aug 6, 2020):
Another update based on on the forum.
This is definitely a problem with their API not conforming with the published documentation. The market param is documented as optional but it actually required.
This will not return a result: https://api.spotify.com/v1/shows/71mvGXupfKcmO6jlmOJQTP
But this will: https://api.spotify.com/v1/shows/71mvGXupfKcmO6jlmOJQTP?market=US
If we want this library to confirm with the docs I can close this issue and leave the code as is.
Alternatively the library could be updated to make the market parameter required. I'd be willing to make a PR with this quick fix and provide documentation for why it is needed.
@felix-hilden commented on GitHub (Aug 6, 2020):
It is needed with application tokens but not user tokens. I think the API is fine. Shows consider the market of a user or the specified market. See the doc for more info https://developer.spotify.com/documentation/web-api/reference/shows/get-a-show/
Though a notice about that to Spotipy documentation would be in order for sure.
@ciferkey commented on GitHub (Aug 6, 2020):
Sounds good. I'll mark as closed then!
@stephanebruckert commented on GitHub (Aug 6, 2020):
What was the simple answer to this in the end?
It didn't find the show because your user token is not from the US, so in your specific case you should specify it?
@felix-hilden commented on GitHub (Aug 6, 2020):
As the documentation suggests, either the market is inferred from a user's country, or it must be specified. Otherwise the show is treated as not available.