Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

Topics with Label: javascript

Labels

Forum Posts

Updating the Criteria for Web API Extended Access

Hey, I created this thread to get your feedback on our blog post around changes to the Web API extended access criteria, which will take place on May 15th. Please share any of your thoughts on this change in the comments below. All of your feedback w...

Spotify

Frandresko

Visitor

20437 Views

115 replies

10 likes

Discussion
  • 20437 Views
  • 115 replies
  • 10 likes

How to avoid 403 Error with Implicit Grant Flow Auth

Hello everybody, I am currently developing a static webapp with html, js and css. I am using Implicit Grant Flow as authorization and everything worked fine. However, when my friend tried to test the app, nothing worked.I quickly found out that it wa...

Newbie

Hello everybody,   I am currently developing a static webapp with html, js and css. I am using Implicit Grant Flow as authorization and everything worked fine. However, when my friend tried to...

Ximzend

Spotify Star

435 Views

1 replies

0 likes

403 error
error
javascript
Question
  • 435 Views
  • 1 replies
  • 0 likes

Preview URL NULL? when making API call?

I just built a practice website yesterday using the Spotify API and used the preview_url to play a song preview with a button to listen to full song on spotifynow today all my API calls return NULL ONLY for the preview_url What gives?? PlanFree/Premi...

Visitor

I just built a practice website yesterday using the Spotify API and used the preview_url to play a song preview with a button to listen to full song on spotify now today all my API calls return NULL...

Ximzend

Spotify Star

1927 Views

3 replies

1 likes

api
javascript
preview_url
  • 1927 Views
  • 3 replies
  • 1 likes

How do i get an access token in javascript?

I've been trying to develop a web app using the spotify api, but the documentation uses curl for api curls and I'm having a bit of trouble trying to figure out how to get an access token using javascript's fetch api. Any help will be appreciated.

Visitor

I've been trying to develop a web app using the spotify api, but the documentation uses curl for api curls and I'm having a bit of trouble trying to figure out how to get an access token using javascript...

Immerhaze

Visitor

1736 Views

2 replies

0 likes

javascript
  • 1736 Views
  • 2 replies
  • 0 likes

Iframe APi & Clientid clientsecret

PlanPremiumCountryFranceDevice Operating SystemWindows 11 My Question or IssueHello I added a player with onSpotifyIframeApiReady inside my html content. This part works well , but even if I'm logged in into spotify web or application the content app...

Casual Listener

Plan Premium Country France Device   Operating System Windows 11   My Question or Issue Hello   I added a player with onSpotifyIframeApiReady inside my html content. T...

Ximzend

Spotify Star

587 Views

5 replies

1 likes

iframeapi
javascript
  • 587 Views
  • 5 replies
  • 1 likes

Spotify API not returning correct album info using my App Client ID & Secret

PlanPremium CountryUnited States DeviceAny — but especially when coding on my MacBook Air w/ M2 Apple Siclicon Chip, 24 GB of RAM, and Mac OS Sonoma v14.2.1 Operating SystemAny — but seen when coding on my My Question or IssueHello — I'm trying to co...

Casual Listener

  Plan Premium   Country United States   Device Any — but especially when coding on my MacBook Air w/ M2 Apple Siclicon Chip, 24 GB of RAM, and Mac OS Sonoma v14.2.1   O...

faddah

Casual Listener

615 Views

2 replies

0 likes

Astro
Client ID
client secret
HTMX
javascript
spotify api
typescript
  • 615 Views
  • 2 replies
  • 0 likes

Any way to stop the Spotify player (embed) when the user scrolls the website page?

Does anyone know of a way to stop the Spotify player (embed) when the user scrolls the website page? We have this code working now: // Get a reference to the embed iframe element const spotifyEmbedWindow = document.querySelector('iframe[src*="spotify...

Casual Listener

Does anyone know of a way to stop the Spotify player (embed) when the user scrolls the website page?  We have this code working now:       // Get a reference to the embed i...

Galina777

Casual Listener

1987 Views

4 replies

1 likes

Embed Player
javascript
pause music
stop playing
toggle
  • 1987 Views
  • 4 replies
  • 1 likes

Superuser Contribution Track Start/Pause Events with Matomo

Is there any way to get callbacks from Embed iFrame API?I would like to track with Matomo Play and Stop events from embedded Spotify iFrames.

Newbie

Is there any way to get callbacks from Embed iFrame API? I would like to track with Matomo Play and Stop events from embedded Spotify iFrames.

Joeyyezhou

Visitor

852 Views

2 replies

0 likes

Analytics
api
Callbacks
embed
javascript
Matomo
tracking
  • 852 Views
  • 2 replies
  • 0 likes

play, togglePlay, pause does not work in iframe api

I have implementeed an iframe api on my website.Since some days, the play control functions do not work.I cannot call play, toogleplay, pause on the embedcontroller in JavaScript.It does neither work in the JavaScript Console. The functions have no e...

Casual Listener

I have implementeed an iframe api on my website. Since some days, the play control functions do not work. I cannot call play, toogleplay, pause on the embedcontroller in JavaScript. It does n...

382 Views

0 replies

2 likes

api
iframe
javascript
  • 382 Views
  • 0 replies
  • 2 likes

Cannot get first authorization code

Well, basically I am trying to start the authorization flow to get an accessToken to retrieve data from the authorized user. The problem is that I am constantly getting `response_type must be code or token` with the code 400 - bad request. The url I ...

Casual Listener

...efault getExchangeCode; ```   I doesn't work in both cases: 1. get redirected from my javascript app 2. access that same url manually

334 Views

0 replies

0 likes

Auth code flow
javascript
  • 334 Views
  • 0 replies
  • 0 likes

/player/play works fine at the first time, but after refresh chrome, it doesnt work

Programmed BySpring boot Java, Html, JavascriptDeviceWeb, ChromeOperating SystemWindows 10 After i build the project for the first time of the day, it works fine. But after i reload the page and runs again, google chrome's top right tab which tells y...

Newbie

Programmed By Spring boot Java, Html, Javascript Device Web, Chrome Operating System Windows 10   After i build the project for the first time of the day, it works fine. But after i r...

278 Views

0 replies

0 likes

chrome
javascript
  • 278 Views
  • 0 replies
  • 0 likes

Cannot delete tracks from a playlist using the API. Receiving 401 error.

PlanFree/PremiumCountryCanada My Question or IssueI've been trying and failing to delete tracks from a playlist using the API. Every method I attempt results in a 401 error from spotify. This is a JavaScript Web App and I'm performing both Oauth and ...

Newbie

...potify.    This is a JavaScript Web App and I'm performing both Oauth and delete requests from a Node.js backend.    I have a valid Oauth2 flow and can create/add tracks to p...

Ximzend

Spotify Star

610 Views

1 replies

0 likes

api
javascript
  • 610 Views
  • 1 replies
  • 0 likes

How can I get results from Web-API queries without using JavaScript?

I've been trying to set up Spotify Web-API for use on my own site for 1 week, but I couldn't get any results. With the help of the document below, I created a simple query interface over nodeJS.Authorization Code Flow | Spotify for Developers You nee...

Newbie

...he Spotify community, how can I use this Web-Api without using JavaScript?

357 Views

0 replies

0 likes

authorize
Get
Help
how
howto
javascript
nodejs
  • 357 Views
  • 0 replies
  • 0 likes

400 bad requests error every time user atuh is provided

My Question or IssueI'm getting Bad Request errors every time I try to make a call with the code generated by giving clientID and clientSecret.I do get a new code every time I log in with Spotify and authorize access and get redirected to the new pag...

Casual Listener

My Question or Issue I'm getting Bad Request errors every time I try to make a call with the code generated by giving clientID and clientSecret. I do get a new code every time I log in with Spotify...

Peter_Schorn

Roadie

646 Views

3 replies

0 likes

javascript
Node
web-api
  • 646 Views
  • 3 replies
  • 0 likes

Track not being fetched - 404 error

PlanPremiumCountryArgentinaDevice(iPhone 8, Samsung Galaxy 9, Macbook Pro late 2016)Operating SystemWindows 10 My Question or IssueI'm trying to make a GET request to the Spotify Web API for a track using simple JavaScript (I don't know curl), but it...

Visitor

...potify Web API for a track using simple JavaScript (I don't know curl), but it's giving me a 404 error My code: //async function to get the token const getToken = async() => {     c...

458 Views

0 replies

0 likes

API request
javascript
  • 458 Views
  • 0 replies
  • 0 likes

Spotify Authorization Problems

PlanFreeCountryUnited StatesDevice(Desktop)Operating System(Windows 10) My Question or IssueHello, I'm currently making an app on Desktop (no backend) with React where a user can see their top songs and artists. I'm using the Implicit Grant Flow Auth...

Casual Listener

Plan Free Country United States Device (Desktop) Operating System (Windows 10)   My Question or Issue Hello, I'm currently making an app on Desktop (no backend) with React where a user...

Slaeh

Casual Listener

2304 Views

2 replies

0 likes

Implicit Flow
javascript
React
spotify api
  • 2304 Views
  • 2 replies
  • 0 likes

Standardizing Completion of API calls to player/play

Dear Spotify: I’m developing an app that creates a series of asynchronous calls to Spotify’s player/play endpoint. The code I wrote is working correctly in that it sends PUT requests to the endpoint near simultaneously. However, each PUT request take...

Visitor

Dear Spotify:   I’m developing an app that creates a series of asynchronous calls to Spotify’s player/play endpoint. The code I wrote is working correctly in that it sends PUT requests to the ...

463 Views

0 replies

0 likes

api
javascript
player
PUT
  • 463 Views
  • 0 replies
  • 0 likes

Cross-Origin Request Blocked: CORS request did not succeed

Hi, I'm currently having an issue where any Spotify API requests I send from client-side JavaScript are resulting in CORS errors. For example, a request to get a user's saved tracks would result in the following error: Cross-Origin Request Blocked: T...

Newbie

Hi, I'm currently having an issue where any Spotify API requests I send from client-side JavaScript are resulting in CORS errors. For example, a request to get a user's saved tracks would result in t...

2468 Views

0 replies

8 likes

api
CORS
javascript
  • 2468 Views
  • 0 replies
  • 8 likes

Web Playback SDK: only first 10 seconds of each song is played

Plan: PremiumCountry: USA Device: Samsung 2020 TVOperating System: Tizen My Question or IssueI am developing an application on Tizen for Samsung TVs which I am attempting to integrate with Spotify. I am using the Spotify Web Playback SDK and initiati...

Newbie

Plan: Premium Country: USA   Device: Samsung 2020 TV Operating System: Tizen   My Question or Issue I am developing an application on Tizen for Samsung TVs which I am ...

Hubo

Community Legend

1235 Views

1 replies

0 likes

javascript
tizen
TizenOS
TV app
web playback sdk
  • 1235 Views
  • 1 replies
  • 0 likes