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

Autorize enpoint not working

Autorize enpoint not working

Hello,

 

I am trying to use the spotify public aPI, and for this I am trying to generate a token according to this documentation:

 

https://developer.spotify.com/documentation/general/guides/authorization/code-flow/

 

The problem is that whenever I try to send the request for authorize, I get error 401 - Unauthorized.

 

Endpoint used: https://api.spotify.com/authorize and https://api.spotify.com/v1/authorize

 

parameters:

- client_id: the one generated by the app

- response_type: code

- redirect_uri: the exact one (copy paste) that I set in the app

 

The error that I am receiving is this one:

 

{
"error": {
"status": 401,
"message": "No token provided"
}
}

 

Can anyone help with this error?

 

Reply
2 Replies

As a mention, I also tried this endpoint: https://accounts.spotify.com/authorize

Hi @g_user_test

There are several steps involved with getting a token through the authorization code flow. In the beginning, your app will redirect the user to https://accounts.spotify.com/authorize with a set of query parameters described in the documentation. The user may then be redirected back to your application. The last step involves making a POST request to https://accounts.spotify.com/api/token as described here.

So there are two URIs to keep in mind, both of them under the accounts.spotify.com hostname rather than api.spotify.com. Hope this helps!

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