Type in your question below and we'll check to see what answers we can find...
Loading article...
Submitting...
If you couldn't find any answers in the previous step then we need to post your question in the community and wait for someone to respond. You'll be notified when that happens.
Simply add some detail to your question and refine the title if needed, choose the relevant category, then post.
Before we can post your question we need you to quickly make an account (or sign in if you already have one).
Don't worry - it's quick and painless! Just click below, and once you're logged in we'll bring you right back here and post your question. We'll remember what you've already typed in so you won't have to do it again.
Please see below the most popular frequently asked questions.
Loading article...
Loading faqs...
Please see below the current ongoing issues which are under investigation.
Loading issue...
Loading ongoing issues...
I am currently working on a project which fetches data from the Spotify API, and my requests work perfectly fine when run locally, but when I deploy my app to Vercel and try to use a live version of the project, the requests are currently failing with an "An authentication error occurred while communicating with Spotify's Web API.\nDetails: invalid_client Invalid client." error message.
This error does not occur when run locally with the exact same ID and secret, and the live version didn't even have this error a couple days ago, I went to test something on the live version after a couple days off, and all of a sudden I get this error every time I try to interact with the API. I am positive that the live version was working perfectly fine before, and nothing changed to cause this sudden error. The requests still work perfectly fine when run locally as well. I have even tried deploying to netlify as well, and it seems to work on netlify as well. Unfortunately Netlify charges for many of the features that are free with Vercel, so I would like to avoid migrating my app there if at all possible. Any idea what could be causing this?
Do you have added the Vercel callback url to the dashboard of your app? (Make sure to hit Save at the bottom after adding it.)
So adding the main Vercel URL as a Redirect URI on the Spotify developer dashboard should help?
or do I need to add the api endpoint url to Redirect URIs? (i.e. 'www.url.com/api/function')
The URI needs to be the same as the URL the Access Token needs to be sent to after you log in. This must be the same as the redirect URI you have written in your code.
I am not sending any access tokens back and forth because this project only involves fetching public data. I just send the client ID and client secret. I am still unsure of what you mean by Redirect URI in my code though.
With Client Credentials you don't need to add the redirect URI.
Where are your client_id and client_secret stored? Maybe your app can't reach them when deployed on Vercel, if they aren't hard-coded in your app.
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…