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

383
Vistas
whatsapp-web.js, how do I send someone a contact card of someone else?

How do I send someone a contact card of someone else in whatsapp-web.js? Can I send a contact card when The person I send the contact card is saved on my phone but the contact I want to send is not on the contact list on my phone

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

0

client.on('ready', async () => {   try {
    console.log('Client is ready!');
    const saved = [];

    var array = fs.readFileSync('numb.txt').toString().split("\n"); //reading file
    for (i in array) {
      //console.log(array[i]);
      saved.push(array[i].substring(1)); //array with number 
    }

    const contacts = [];
    for (var i = 0; i < saved.length; i++) {
      contacts.push(await client.getContactById(saved[i] + '@c.us')); }
    client.sendMessage(to, contacts); //sending contact cards   
} });
about 4 years ago · Juan Pablo Isaza Denunciar

0

you can send it by sending vcard as text message.

Example:

client.on('ready', async () => {
    client.sendMessage(
        '1234567890@c.us', 
        'BEGIN:VCARD
          ....(vcarddata)....
        END:VCARD', 
        {'parseVCards':true}) // by default its true
     .then(...).catch(...);
});

VCard will be parsed and made contact by parseVCard option.

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