Skip to content

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

Description

@mattypenny

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions