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

Get Player State 404

Get Player State 404

Plan

Free

Country

Spain

Device

Hp Laptop

Operating System

Windows 10

 

My Question or Issue

I am trying to request data from this endpoint: https://api.spotify.com/v1/me/player

I am using the method "get" and the next header:

Authorization: Bearer my_access_token

 

the request state when I try to execute it is 404 and the response body:

{
    "error": {
        "status": 404,
        "message": "Invalid username"
    }
}
At the moment of execute the request, I was logged in the desktop app and a track was playing. Also, the access token was not expired.
Reply
1 Reply

You are possibly trying to use that endpoint with an access token that is generated through the Client Credentials flow. You need an access toke that's generated through the Authorization Code Flow to use that endpoint.

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.

Suggested posts

Let's introduce ourselves!

Hey there you,   Yeah, you! 😁   Welcome - we're glad you joined the Spotify Community!   While you here, let's have a fun game and get…

ModeratorStaff / Moderator/ 4 years ago  in Social & Random