Open strenkml opened 3 months ago
I think you have the same as https://github.com/spotify/spotify-web-api-ts-sdk/issues/70#issuecomment-1712494647
Client credentials are used for server-side authentication limited to non-user-related functionality; hence the playlist API is being rejected. It would be great to know if this would be allowed in the future from Spotify.
https://developer.spotify.com/documentation/web-api/tutorials/client-credentials-flow
The Client Credentials flow is used in server-to-server authentication. Since this flow does not include authorization, only endpoints that do not access user information can be accessed.
I am making a Discord bot that creates playlists from song links that are post in a Discord channel. I am running into the following error:
Error: Bad or expired token. This can happen if the user revoked a token or the access token has expired. You should re-authenticate the user.
In the docs it says to use the client credentials if you are making a server side application.This is the relevant code:
The authentication part runs without error but the profile part throws the error. If I hardcode my user id and try creating the playlist with the following code I just the same error: