Assign Media from the Library to the Playlist using API

Im on python and I can’t execute this code:

data1 = {“media”:[189,190]}
url = config.CMS_API_URL+"/playlist/library/assign/200"
r = requests.post(url, data = data1, headers = headers)
print(r.text)

This gives me an 422 code saying that I need to provide media, but I alredy did that in data1, so what is the problem?

Hi,
It will be expecting form-data or urlendocded not JSON.

The Xibo Community site uses cookies. What are cookies?