Announcements

Help Wizard

Step 1

NEXT STEP

CORS error with authorization endpoint

CORS error with authorization endpoint

Hi!

 

I posted a question under this topic already but it seems it's disappeared.

 

I'm trying to build an app that connects to the spotify API and extracts some data. In order to do this I need to use the authorization endpoint to get an authorization code which will in turn allow me to get an access token. However, the authorization endpoint is currently giving me the following CORS error when I try to access it with a GET request: Cross-origin redirection to https://accounts.spotify.com/sv/login?continue=https%3A%2F%2Faccounts.spotify.com%2Fauthorize%3Fclie... denied by Cross-Origin Resource Sharing policy: Origin http://localhost:8000 is not allowed by Access-Control-Allow-Origin.

 

The endpoint URL still works on its own, including if I use it as a simple redirect. However, this won't allow me to get the authorization code, and by extension the access token, which I need for my other API calls.

 

Does anyone have any insight as to what this issue could be, if it's on Spotify's side or if I could have made some mistake that lead to this error? Honestly I would really prefer the latter since that would give me something to work on.

 

Thank you for any and all help, I could really use it at this point!

Reply
0 Replies

Suggested posts