Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

error 401 permission missing

error 401 permission missing

trying to make a lua that reads current playing (https://api.spotify.com/v1/me/player/currently-playing). now before this bs update that removed the easy button for getting bearer auth tokens with permissions you could set everything would work. now i'm trying to use the token after a nice person hold me how to get it, but it just simply says permissions missing. also, i can't really add no oauth2 or app stuff because this is what i'm limited to:

caracall_0-1688648578699.png

 

 

help will be appreciated dearly

(flag: user-read-currently-playing if you're asking)

caracall_1-1688648578697.png

 

 

Reply
6 Replies

Sorry I didn't find this earlier, but I've found a 2 years old Spotify API wrapper in LUA (without instructions how to use it): https://hg.sr.ht/~cloudninja/lua-spotify/browse/Spotify.lua?rev=tip

You have to use that to get a valid access token for now on.

You can get a Client ID and Client Secret at the Dashboard section of dev.spotify.com. You also have to fill in a redirect URI add the dashboard your created app (and in your code).

Note: I'm not familiar with Lua, and haven't tested it myself.

P.S. to be complete, I will post this also under the original question where you mentioned the programming language.

XimzendSpotify 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.

unfortunately - it doesn't provide me with too much help, thanks anyways though

I had Chat-GPT write instructions on how to use the wrapper. You can read them here.

I recommend to save the code of the wrapper in a separate file.

XimzendSpotify 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, if you are getting a 401 error it means that you do not have the user-read-currently-playing scope associated with your user token.  Make sure when making the authentication call to receive a token you pass user-read-currently-playing as a scope.

I also found your previous post where someone advises you to get the token via the Network panel.  I don't advise using this method, instead you should explore how to perform the authentication yourself.  That token accessible is intended for usage on the Developer Portal only. 

that's the point of the thread, how the **bleep** do i enable the scopes on this god awful new page???

You need to use the authorisation flow to acquire your own token rather than using the one from the Developer portal: https://developer.spotify.com/documentation/web-api/concepts/authorization

Most of the code that Ximzend has referenced above will help you do this.

Suggested posts