Help Wizard

Step 1

NEXT STEP

Topics with Label: javascript

Labels

Forum Posts

Important: App review and quota extension waiting times

The Spotify for developers platform helps many bring their ideas to life. Whether it's a short term app helping an artist’s release or something more long term - there is always a chance of success. Things start to grow and then you might also need w...

  • Moderator
  • Moderator
  • Naianasha
  • Gig Goer
  • 20421 Views
  • 138 replies
  • 20 likes
  • 20421 Views
  • 138 replies
  • 20 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...
  • quizme
  • Casual Listener
  • 1355 Views
  • 1 replies
  • 1 likes
  • api
    javascript
    preview_url
  • 1355 Views
  • 1 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
  • 387 Views
  • 2 replies
  • 0 likes
  • Astro
    Client ID
    client secret
    HTMX
    javascript
    spotify api
    typescript
  • 387 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
  • 1201 Views
  • 4 replies
  • 1 likes
  • Embed Player
    javascript
    pause music
    stop playing
    toggle
  • 1201 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
  • 660 Views
  • 2 replies
  • 0 likes
  • Analytics
    api
    Callbacks
    embed
    javascript
    Matomo
    tracking
  • 660 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...
  • 226 Views
  • 0 replies
  • 2 likes
  • api
    iframe
    javascript
  • 226 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
  • ...lient_secret=<my_client_secret>&scope=user-read-recently-played+user-top-read+playlist-modify-public&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fv1%2Fcallback`   Obviously I am using t...
  • 208 Views
  • 0 replies
  • 0 likes
  • Auth code flow
    javascript
  • 208 Views
  • 0 replies
  • 0 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...
  • Domen
  • Casual Listener
  • 760 Views
  • 1 replies
  • 0 likes
  • javascript
  • 760 Views
  • 1 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...
  • 151 Views
  • 0 replies
  • 0 likes
  • chrome
    javascript
  • 151 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
  • Roadie
  • 410 Views
  • 1 replies
  • 0 likes
  • api
    javascript
  • 410 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...

vSky_0-1666438603421.png vSky_1-1666439375412.png
  • Newbie
  • ...he Spotify community, how can I use this Web-Api without using JavaScript?
  • 255 Views
  • 0 replies
  • 0 likes
  • authorize
    Get
    Help
    how
    howto
    javascript
    nodejs
  • 255 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
  • 420 Views
  • 3 replies
  • 0 likes
  • javascript
    Node
    web-api
  • 420 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...
  • 313 Views
  • 0 replies
  • 0 likes
  • API request
    javascript
  • 313 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
  • 1636 Views
  • 2 replies
  • 0 likes
  • Implicit Flow
    javascript
    React
    spotify api
  • 1636 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 ...
  • 337 Views
  • 0 replies
  • 0 likes
  • api
    javascript
    player
    PUT
  • 337 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...
  • 2056 Views
  • 0 replies
  • 7 likes
  • api
    CORS
    javascript
  • 2056 Views
  • 0 replies
  • 7 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
  • 961 Views
  • 1 replies
  • 0 likes
  • javascript
    tizen
    TizenOS
    TV app
    web playback sdk
  • 961 Views
  • 1 replies
  • 0 likes