Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add to saved tracks seems to have changed #228

Open
RuurdBijlsma opened this issue Sep 30, 2024 · 0 comments
Open

Add to saved tracks seems to have changed #228

RuurdBijlsma opened this issue Sep 30, 2024 · 0 comments

Comments

@RuurdBijlsma
Copy link

RuurdBijlsma commented Sep 30, 2024

Describe the bug
I'm using spotify.api.addToMySavedTracks, but i get a network error (status 400) in the console:

responseText: "{\"error\": {\"status\": 400, \"message\": \"Missing required field: ids\" } }"

It seems that this package sends as payload just an array of ids, but spotify expects this format:

{
    "ids": [
        "string"
    ]
}

To Reproduce
Steps to reproduce the behavior:

  1. Run code spotify.api.addToMySavedTracks([id])
  2. See network error 400 as described above

Expected behavior
I expect it to not error and use {ids:[]} as request payload

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: windows
  • Browser chrome (electron)
  • Version 1.5.2

I'll try to make a pr for it

Source: https://developer.spotify.com/documentation/web-api/reference/save-tracks-user

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant