Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

89
Vistas
How to add uris to post request in javascript

I can't seem to figure out how to add uris to a post request like in this api request: https://developer.spotify.com/console/post-playlist-tracks/?playlist_id=3cEYpjA9oz9GiPac4AsH4n&position=&uris=spotify%3Atrack%3A4iV5W9uYEdYUVa79Axb7Rh%2Cspotify%3Atrack%3A1301WleyT98MSxVHPZCA6M

this is what my request looks like currently put does not work

fetch(endPoint, {
method: "POST",
headers: {
  Authorization: `Bearer ${access_token}`,
},
body: JSON.stringify({
  "uri": data
})
});

thanks in advance for any help

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Based on this doc: https://developer.spotify.com/documentation/web-api/reference/#/operations/add-tracks-to-playlist

It looks like you have the format of the body wrong. It should look something like this:

    fetch(endPoint, {
        method: "POST",
        headers: {
            Authorization: `Bearer ${access_token}`,
            'Content-Type': 'application/json',
        },
        body: JSON.stringify({
            uris: [
                "uri-1",
                "uri-2",
            ],
        })
    });
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda