spotishell icon indicating copy to clipboard operation
spotishell copied to clipboard

I had to prefix the trackid with "spotify:track:" when using Add-PlaylistItem

Open mattypenny opened this issue 9 months ago • 1 comments

Describe the bug

First...I'm really enjoying playing with the module. Great stuff!

In all likelihood I've just misunderstood something, but this is what I found

When I tried to run:

 Add-PlaylistItem -Id $PlaylistId -ItemId $TrackId -ApplicationName $ApplicationName

I got an error:

Error adding track to playlist:  {   "error": {     "status": 400,     "message": "Invalid base62 id"   } }

I added this to my code:

$TrackId = "spotify:track:$TrackId"

...and that seemed to fix it (although there's every chance I've misunderstood)

To Reproduce Add-PlaylistItem -Id 57Gg47irhv6DDuQ8LH0t8R -ItemId 7wSco4c7DSaTvcrryRmy6S -ApplicationName Spotishell

...whereas if I do:

Add-PlaylistItem -Id 57Gg47irhv6DDuQ8LH0t8R -ItemId "spotify:track:7wSco4c7DSaTvcrryRmy6S" -ApplicationName Spotishell

....it works

Expected behavior Track added to playlist

Desktop (please complete the following information):

  • OS: Windows 11, Powershell 7
  • Version 11

This page does imply you (now) need the prefix

https://developer.spotify.com/documentation/web-api/reference/add-tracks-to-playlist

mattypenny avatar Apr 22 '25 17:04 mattypenny

Thanks for filing this. Haven't been able to support this module the way I want but your bug isn't ignored! Will try to take a look at this in the coming weeks.

wardbox avatar May 09 '25 19:05 wardbox

thanks very much!

On Tue, 2 Dec 2025, 19:02 wardbox, @.***> wrote:

Closed #56 https://github.com/wardbox/spotishell/issues/56 as completed via #61 https://github.com/wardbox/spotishell/pull/61.

— Reply to this email directly, view it on GitHub https://github.com/wardbox/spotishell/issues/56#event-21314559627, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKC2AWK2IAXGDESM2VPCBD37XO4FAVCNFSM6AAAAAB3UIIKNSVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMRRGMYTINJVHE3DENY . You are receiving this because you authored the thread.Message ID: @.***>

mattypenny avatar Dec 02 '25 19:12 mattypenny