[GH-ISSUE #186] Podcasts functions seems not to work entirely?! #122

Closed
opened 2026-02-27 19:26:11 +03:00 by kerem · 1 comment
Owner

Originally created by @nicmare on GitHub (Apr 22, 2020).
Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/186

I could start a request by using
$track = $api->getTrack('6bPnY2qoxpP6pYVGFIeoXG');
or
$artist = $api->getArtist('0flK7a9sS4TEcCYVNUaiXU');

that works!

now i want to retrieve some infos about podcasts. for example this one: spotify:show:7nwKLoptCS7YFNKpDkti3p
but when i try this:
$episodes = $api->getShowEpisodes('7nwKLoptCS7YFNKpDkti3p');
i get a critical error:

[22-Apr-2020 15:43:54 UTC] PHP Fatal error:  Uncaught SpotifyWebAPI\SpotifyWebAPIException: non existing id in /Users/nicb/Data/_htdocs/kadh/wp-content/themes/bootstrap/vendor/jwilsson/spotify-web-api-php/src/Request.php:56
Stack trace:
#0 /Users/nicb/Data/_htdocs/kadh/wp-content/themes/bootstrap/vendor/jwilsson/spotify-web-api-php/src/Request.php(265): SpotifyWebAPI\Request->parseBody(Object(stdClass), 404)
#1 /Users/nicb/Data/_htdocs/kadh/wp-content/themes/bootstrap/vendor/jwilsson/spotify-web-api-php/src/Request.php(137): SpotifyWebAPI\Request->send('GET', 'https://api.spo...', '', Array)
#2 /Users/nicb/Data/_htdocs/kadh/wp-content/themes/bootstrap/vendor/jwilsson/spotify-web-api-php/src/SpotifyWebAPI.php(86): SpotifyWebAPI\Request->api('GET', '/v1/shows/7nwKL...', Array, Array)
#3 /Users/nicb/Data/_htdocs/kadh/wp-content/themes/bootstrap/vendor/jwilsson/spotify-web-api-php/src/SpotifyWebAPI.php(1286): SpotifyWebAPI\SpotifyWebAPI->sendRequest('GET', '/v1/shows/7nwKL...', Array)
#4 /Users/nicb/Data/_htdocs/kadh/wp-content/themes/bootstrap/functions.ph in /Users/nicb/Data/_htdocs/kadh/wp-content/themes/bootstrap/vendor/jwilsson/spotify-web-api-php/src/Request.php on line 56

what is wrong here?

Originally created by @nicmare on GitHub (Apr 22, 2020). Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/186 I could start a request by using `$track = $api->getTrack('6bPnY2qoxpP6pYVGFIeoXG');` or `$artist = $api->getArtist('0flK7a9sS4TEcCYVNUaiXU');` that works! now i want to retrieve some infos about podcasts. for example this one: `spotify:show:7nwKLoptCS7YFNKpDkti3p` but when i try this: `$episodes = $api->getShowEpisodes('7nwKLoptCS7YFNKpDkti3p');` i get a critical error: ``` [22-Apr-2020 15:43:54 UTC] PHP Fatal error: Uncaught SpotifyWebAPI\SpotifyWebAPIException: non existing id in /Users/nicb/Data/_htdocs/kadh/wp-content/themes/bootstrap/vendor/jwilsson/spotify-web-api-php/src/Request.php:56 Stack trace: #0 /Users/nicb/Data/_htdocs/kadh/wp-content/themes/bootstrap/vendor/jwilsson/spotify-web-api-php/src/Request.php(265): SpotifyWebAPI\Request->parseBody(Object(stdClass), 404) #1 /Users/nicb/Data/_htdocs/kadh/wp-content/themes/bootstrap/vendor/jwilsson/spotify-web-api-php/src/Request.php(137): SpotifyWebAPI\Request->send('GET', 'https://api.spo...', '', Array) #2 /Users/nicb/Data/_htdocs/kadh/wp-content/themes/bootstrap/vendor/jwilsson/spotify-web-api-php/src/SpotifyWebAPI.php(86): SpotifyWebAPI\Request->api('GET', '/v1/shows/7nwKL...', Array, Array) #3 /Users/nicb/Data/_htdocs/kadh/wp-content/themes/bootstrap/vendor/jwilsson/spotify-web-api-php/src/SpotifyWebAPI.php(1286): SpotifyWebAPI\SpotifyWebAPI->sendRequest('GET', '/v1/shows/7nwKL...', Array) #4 /Users/nicb/Data/_htdocs/kadh/wp-content/themes/bootstrap/functions.ph in /Users/nicb/Data/_htdocs/kadh/wp-content/themes/bootstrap/vendor/jwilsson/spotify-web-api-php/src/Request.php on line 56 ``` what is wrong here?
kerem closed this issue 2026-02-27 19:26:11 +03:00
Author
Owner

@nicmare commented on GitHub (Apr 22, 2020):

okay. after looking into spotify docs directly, i found out "market" option is required. Seem to work now like this:

$show = $api->getShow('7butYcpxarLP55AfoCHjU7',array("market"=>"DE"));

<!-- gh-comment-id:617866942 --> @nicmare commented on GitHub (Apr 22, 2020): okay. after looking into spotify docs directly, i found out "market" option is required. Seem to work now like this: `$show = $api->getShow('7butYcpxarLP55AfoCHjU7',array("market"=>"DE")); `
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/spotify-web-api-php#122
No description provided.