Need help? Check out Spotify Answers for solutions to a wide range of topics. |
We are able to get an access token using our client id and client secret from https://accounts.spotify.com/api/token
We then try to use the access token as follows
curl -v -H "Authorization: Bearer {TOKEN}" https://provider-api.spotify.com/v1/analytics/{LICENSOR}/enhanced/streams/2020/01/01 -L
The endpoint returns an empty HTTP/2 403 response.
The token seems valid, since changing the token results in an invalid token error.
Any ideas what is causing the 403 response?
Hey @driverdave, thanks for posting on the Spotify Community!
Hmm, let's see what could be happening here. It looks like you're using a private API for artist statistics. Could you try to implement a different authorization flow and authorise with an account that has access to this private API? There's some more information about that here: https://developer.spotify.com/documentation/general/guides/authorization-guide/.
Let me know if you have any questions!
Happy coding,
Hubo
Hi Hubo,
Thanks for the response.
When you mention "a different authorization flow", do you mean using a different client id and client secret? Or are you referring to a different way to request an access token?
Or, asked a different way, do you think the issue the way we requested the access token, or is the issue the permissions associated with our client id used to create the token?
Thanks Again,
- Dave
Hi @driverdave. I would recommend reaching out to the Analytics API team for help with this particular API - you can contact them at analytics-api@spotify.com 🙂