[GH-ISSUE #173] no preview_urls with authorization using the client credentials flow #114

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

Originally created by @cdlx23 on GitHub (Nov 15, 2019).
Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/173

Hi :)
First of all thanks a lot for the wrapper, I love it and it's very useful to me!

For some reason I don't get the preview_urls for tracks with authorization using the client credentials flow. Using the authorization code flow it works fine. All other values like id, popularity etc. work just fine, just preview_url is empty. I tested it with getTrack(s) and getAlbum(s) Any idea what this could be?

Example request:

$track = $api->getAlbum( '3msNbiI057b6ypzeOTjgxJ', [ 'market' => 'de' ] );

Thanks a lot!!

Originally created by @cdlx23 on GitHub (Nov 15, 2019). Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/173 Hi :) First of all thanks a lot for the wrapper, I love it and it's very useful to me! For some reason I don't get the preview_urls for tracks with authorization using the client credentials flow. Using the authorization code flow it works fine. All other values like id, popularity etc. work just fine, just preview_url is empty. I tested it with getTrack(s) and getAlbum(s) Any idea what this could be? Example request: `$track = $api->getAlbum( '3msNbiI057b6ypzeOTjgxJ', [ 'market' => 'de' ] );` Thanks a lot!!
kerem 2026-02-27 19:26:08 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@jwilsson commented on GitHub (Nov 16, 2019):

Hey!
Thank you for the kind words! :)

According to Spotify the preview_url field can be null for a variety of reasons. My guess is that you need a user's info to see the preview_url values.

<!-- gh-comment-id:554619227 --> @jwilsson commented on GitHub (Nov 16, 2019): Hey! Thank you for the kind words! :) [According to Spotify](https://github.com/spotify/web-api/issues/729#issuecomment-349758014) the `preview_url` field can be `null` for a variety of reasons. My guess is that you need a user's info to see the `preview_url` values.
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#114
No description provided.