Help Wizard

Step 1

NEXT STEP

Provider API Returns 403

Provider API Returns 403

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?

Reply
3 Replies

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

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.

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 🙂

Suggested posts