@wppconnect/wa-js - v3.17.0
    Preparing search index...

    Interface LinkPreviewOptions

    interface LinkPreviewOptions {
        linkPreview?:
            | boolean
            | {
                canonicalUrl?: string;
                description?: string;
                doNotPlayInline: boolean;
                matchedText?: string;
                richPreviewType?: number;
                thumbnail?: string;
                title?: string;
            };
    }
    Index

    Properties

    Properties

    linkPreview?:
        | boolean
        | {
            canonicalUrl?: string;
            description?: string;
            doNotPlayInline: boolean;
            matchedText?: string;
            richPreviewType?: number;
            thumbnail?: string;
            title?: string;
        }

    Send text message with link preview

    true
    
    // Automatic detection
    WPP.chat.sendTextMessage('[number]@c.us', 'See https://www.youtube.com/watch?v=v1PBptSDIh8');

    // Overriding the title and description
    WPP.chat.sendTextMessage('[number]@c.us', 'See https://www.youtube.com/watch?v=v1PBptSDIh8', {
    linkPreview: {
    title: 'Another text',
    description: 'Another description'
    }
    });