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

Malformed JSON Web API Playback

Solved!

Malformed JSON Web API Playback

Plan

Premium

Country

Canada

Device

Web Brower

Operating System

Windows 10

 

My Question or Issue

I am calling using the v1/me/player/play endpoint. I am getting Response 400 Malformed json. I had followed this 
This is my code: 

import requests

headers = {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer {}'.format(s.token)
}

json_data = {
    'uris': 'spotify:track:6habFhsOp2NvshLv26DqMb'
}


response = requests.put(url, headers=headers, json=json_data)
Reply

Accepted Solutions
Marked as solution

uris is an array. has to be 'uris' : ['track']

View solution in original post

1 Reply
Marked as solution

uris is an array. has to be 'uris' : ['track']

Suggested posts

Staff
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…

Staff
ModeratorStaff / Moderator/ 3 years ago  in Social & Random

Type a product name