Announcements
From 28th September 2026, Community private messages will no longer be available. If you have any private messages you'd like to keep, please save or copy them using these steps before this date. Thank you.

Help Wizard

Step 1

NEXT STEP

OEmbed API missing CORS headers

Solved!

OEmbed API missing CORS headers

It's not possible to hit the oembed endpoint from client-side JS. Try running this in your browser console on any non-Spotify domain:

 

 

await fetch('https://open.spotify.com/oembed?url=https://open.spotify.com/track/6fHxL22apYBSywdSSZlp6h').then(r => r.json())

 

 

You will get a CORS error. For reference, YouTube, SoundCloud, Vimeo have CORS-enabled oembed endpoints.

Reply

Accepted Solutions
Marked as solution

Hello @cdrini, thanks for reporting this bug.

Your issue should be resolved now, we have added CORS support to the "/oembed" endpoint.

View solution in original post

3 Replies
Marked as solution

Hello @cdrini, thanks for reporting this bug.

Your issue should be resolved now, we have added CORS support to the "/oembed" endpoint.

Hi, 

it still doesn't work for playlists. The following example gives the same error.

await fetch('https://embed.spotify.com/oembed?url=https://open.spotify.com/playlist/5uHTCYBvcpQfP234BQwzqT').then(r => r.json())

 

Awesome! Thank you for the fix, dev team 🙂

Suggested posts

Let's introduce ourselves!

Hey there you,   Yeah, you! 😁   Welcome - we're glad you joined the Spotify Community!   While you here, let's have a fun game and get…

ModeratorStaff / Moderator/ 5 years ago  in Social & Random