Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

166
Visualizações
How do I use Vimeo oEmbed API in nodejs?

I am working on a react web application that can upload videos to Vimeo and retrieve them when required. I am able to successfully upload the video privately. I am using the hide from Vimeo privacy setting and embed on specific domains option. On uploading the video I want to receive an embeddable iframe string from the backend server so that I can display the video in my react app. The oEmbed API provided on Vimeo API reference page is working in postman. But when I try to get it through nodejs string I get the following error:

Error: {"error":"The requested page couldn't be found."} at IncomingMessage. (C:\Users\prith\node_modules\vimeo\lib\vimeo.js:164:19) at IncomingMessage.emit (node:events:402:35) at endReadableNT (node:internal/streams/readable:1343:12) at processTicksAndRejections (node:internal/process/task_queues:83:21) status code 404 headers { connection: 'close', 'content-length': '49', server: 'nginx', 'content-type': 'application/vnd.vimeo.error+json', expires: 'Sun, 10 Apr 2022 20:00:04 GMT', 'cache-control': 'private, no-store, no-cache', 'strict-transport-security': 'max-age=31536000; includeSubDomains; preload', 'request-hash': '8fa895fc', 'x-bapp-server': 'api-v22576-6dhrr', 'x-vimeo-dc': 'ge', 'accept-ranges': 'bytes', via: '1.1 varnish, 1.1 varnish', 'fastly-original-body-size': '0', date: 'Mon, 11 Apr 2022 08:00:04 GMT', 'x-served-by': 'cache-iad-kiad7000087-IAD, cache-maa10229-MAA', 'x-cache': 'MISS, MISS', 'x-cache-hits': '0, 0', 'x-timer': 'S1649664004.146166,VS0,VE292', vary: 'Accept,Vimeo-Client-Id' }

This is my code:

vimeo_embed.js

let Vimeo = require('vimeo').Vimeo;

const USER_ID = "USER_ID"
const USER_SECRET = "USER_SECRET"
const USER_TOKEN = "USER_TOKEN"

let client = new Vimeo(USER_ID, USER_SECRET, USER_TOKEN);

client.request({
    method: 'GET',
    path: '/app/oembed.json/',
    query: {url: 'https%3A//vimeo.com/xxxxxxxx'}
},function (error, body, status_code, headers) {
    if (error) {
      console.log('error');
      console.log(error);
    } else {
      console.log('body');
      console.log(body);
    }
   
    console.log('status code');
    console.log(status_code);
    console.log('headers');
    console.log(headers);
  });

I am not clear about why this error is thrown. I have verified that the authentiction is working. Please help me.

about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

I guess the NodeJS lib does not have oembed endpoint yet, as you can see here: https://developer.vimeo.com/api/reference#table-1

So you need to use old way to fetch this data.

about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda