Announcements

Help Wizard

Step 1

NEXT STEP

401 Error

401 Error

I get a 401 error. I don't share the code because the code works properly in local. When I make a request to the API, it gives a 401 error. Server is running on edge. What can cause this problem?

Reply
1 Reply

Hi DukeEmree, Welcome to the Community!

 

Error 401 means: Bad or expired token. This can happen if the user revoked a token or the access token has expired. You should re-authenticate the user.
Access tokens are only valid for 1 hour.

If you are using the Authorization code (with or without PKCE), you can refresh the token, as you can read here.

 

Let me know if this answered your question, and if you have other questions.

 
XimzendSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

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/ 4 years ago  in Social & Random