The callback url makes the url with hash instead of querystring

The callback url makes the url with hash instead of querystring

Hi, following this docs:

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

 

The flow works well, but is returning back with a hash:

http://localhost:5000/callback#access_token=BQDt7fHXta65b...

 

Instead of a queryString:

http://localhost:5000/callback?access_token=BQDt7fHXta65b...

 

 

Am I doing something wrong?

Reply
1 Reply

Hey @Josenzo, thanks for reaching out!

 

Hmm, I've taken a look and it seems that this is expected behaviour.

 

"If the user grants access, the final URL will contain a hash fragment with the following data encoded as a query string. For example: 

https://example.com/callback#access_token=NwAExz...BV3O2Tk&token_type=Bearer&expires_in=3600&state=123"

 

Note: a query string will be returned when the user denies access.

 

Check this out for more information: https://developer.spotify.com/documentation/general/guides/authorization-guide/#1-have-your-applicat...

 

Let me know if you have any questions! 🙂

 

Have a good one,

Hubo

HuboSpotify 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