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

320
Vistas
How to Upload Video to Pinterest via API

I am trying to upload a video to Pinterest, so I followed the instructions in their docs here

Here is how I attempted the upload

let headers = {
      'Authorization': `Bearer ${access_token}`
}
let videoUploadIntentEndpoint = `https://api.pinterest.com/v5/media`;
let videoUploadIntentResponse = await axios.post(videoUploadIntentEndpoint,
    {
        "media_type": "video"
    },
    {
        headers: headers
    }
);
let { media_id, upload_parameters, media_type, upload_url } = videoUploadIntentResponse.data;
if (media_id && upload_url) {
    try {
        let vidUploadParams = new URLSearchParams();
        vidUploadParams.append("file", got.stream(mediaUrl));
        let videoUploadResponse = await axios.post(upload_url, vidUploadParams, {
            headers: { ...upload_parameters }
        });
        let vidData = videoUploadResponse.data;
        console.log(`Pinterest Video Successful with Data`);
        console.log(JSON.stringify(vidData, null, 2));
    } catch (vidError) {
        console.log(`Pinterest Video Upload Error`);
        console.log(vidError);
    }
}

And the error I keep getting back is

AccessDeniedNo AWSAccessKey was presented.AFHHW0M2afafafR9N8afafafafafafa+g5y3qsXqKwta0eN6ND03J7UDEjpk4F1/qbFrfec=

How can I resolve this?

Thanks

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

0

The doc isn't super clear, but the upload_parameters must be sent along the file in the body, not in the headers. "Send the media file's contents as the request's file parameter and also include all of the parameters from upload_parameters" (this is confusing because Content-Type still belongs in the headers)

(the AWSAccessKey the error is talking about is the first part of the x-amz-credentials string)

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