SpotifyAPI POST请求将曲目添加到播放列表 - 错误400不良请求

问题描述 投票:0回答:1

我提出了授权用户的请求 - 包括用于创建公共播放列表的范围,在有效的不同代码块中,以下是:

leletscopes ='playlist-modify-public';

-window.location.replace(

https://accounts.spotify.com/authorize?client_id=${clientID}&scope=${scopes}&redirect_uri=${redirectURI}&response_type=token

);`

感谢一吨!

    

json数组需要围绕其中每个元素的引号。因此,应该引用每个曲目,例如:

reactjs api spotify
1个回答
0
投票
{"uris": ["spotify:track:4iV5W9uYEdYUVa79Axb7Rh", "spotify:track:1301WleyT98MSxVHPZCA6M"]}

我认为您正在为一个名为URI的对象提供一个无效的数组。

,请注意,您也可以将播放列表项目作为查询参数传递(而不是在体内),而无需使用JSON。  
https://developer.spotify.com/web-api/add-tracks-to-playlist/

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.