- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Premium- Family Plan
United Arab Emirates
I am trying to use the Get currently playing track API and I am getting 400 & 404 error "Only valid bearer authentication supported" & "Invalid Username" , I am able to use the Search API which works perfectly fine!
async function getNowPlaying(){
const nowPlayingParameters = {
method: "GET",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${accessToken}`
}
}
const res = await fetch(`https://api.spotify.com/v1/me/player/currently-playing?market=AE&additional_types=track`, nowPlayingParameters)
const json = await res.json()
console.log(json)
}
Solved! Go to Solution.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page