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

299
Vistas
How to fetch Twitter Username and Profile Photo using the Twit NPM Package

I am making use of the twit npm pacakge as below to get the Authenticated Twitter Username and Profile Image amongst other information.

        const Twit = require('twit');

        let T = new Twit({
            consumer_key: 'xxx',
            consumer_secret: 'xxx',
            access_token: 'xxx',
            access_token_secret: 'xxx',
            timeout_ms: 60 * 1000,  
            strictSSL: true,
        });
        T.get('users/show.json', { screen_name: `${usernameFromAbove}`}, function (err, data, response) {
            if (err) {
                console.log(`User Fetch Error`);
                console.log(err);
            }
            console.log(data);
        });

Unfortunately the response I keep getting is this:

2021-09-23T23:38:55.659299+00:00 app[web.1]:   errors: [ { message: 'Sorry, that page does not exist', code: 34 } ]

Am I calling the wrong endpoint? I'm currently confused?

Any insight to resolve this would be greatly appreciated.

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

0

The endpoint is 'users/show' not 'users/show.json'.

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