AddPlaylistTrack and AddPlaylistTracks states invalid track URI
Currently trying to use the AddPlaylistTrack and AddPlaylistTracks but the function always returns status 400, invalid track uri for the every single uri that I try to pass in. I checked in google if the uris are valid so I don't believe that is the issue. For reference, here is one working URI that is not passing. 2oUmr2Kaxup6iOglqK0FK3
The error message is specifically "Invalid track uri: 2oUmr2Kaxup6iOglqK0FK3"
2oUmr2Kaxup6iOglqK0FK3 isn't a valid URI, it's a track ID. The URI would be spotify:track:2oUmr2Kaxup6iOglqK0FK3
Oh ok thanks for the heads up! I followed what it said in the documentation for the format so that confused me a bit. Also, it looks like I got it to work but it only inputs 100 songs into a playlist? Do I need to manually split the array or did I miss a setting that I need to set?
A maximum of 100 tracks can be added in one request. https://developer.spotify.com/documentation/web-api/reference/playlists/add-tracks-to-playlist/
Yes, 100 is the maximum, you need to loop it. I also recommend checking if the track is local as it won't work then.
if (URI.Substring("spotify:".Length, "local".Length) != "local")