mopidy / mopidy-spotify

Mopidy extension for playing music from Spotify
https://mopidy.com/ext/spotify/
Apache License 2.0
933 stars 109 forks source link

Question: spotify authorization scheme #282

Closed TheQwertiest closed 2 years ago

TheQwertiest commented 4 years ago

I apologize in advance, since this question is mostly off-topic. But I'm at my wits end and this is the only place left where I can at least potentially get any information...

I'm developing a desktop app that uses Spotify's Web API. App uses the following auth scheme: https://developer.spotify.com/documentation/general/guides/authorization-guide/#authorization-code-flow-with-proof-key-for-code-exchange-pkce

After this app started gaining users it quickly reached (seemingly really low) rate limits, after which all requests end up with 429 error code (even when respecting Retry-After header).

It seems that there are no such problems in mopidy-spotify, so I thought that may be the difference lies in the authentication scheme used?

I've tried searching this repo's code, but it looks like all auth requests are done via a dedicated web service.

Would it be possible to share the concrete auth scheme that is used here? Any help would be greatly appreciated...

kingosticks commented 2 years ago

Sorry I never replied to this. We only use the Web API for a few things, namely search, playlists and images. We also cache the results where possible (especially playlist data). There's nothing special about the auth scheme we use, it's the standard OAuth auth code flow just that we do it via another server in order to keep our secret a secret (PKCE was not available at the time). Perhaps older apps have larger rate limits? Sorry can't be more help, I hope you managed to solve your problem.