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

Properties

Properties

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

Send text message with link preview

Type declaration

  • Optional canonicalUrl?: string
  • Optional description?: string
  • doNotPlayInline: boolean
  • Optional matchedText?: string
  • Optional richPreviewType?: number
  • Optional thumbnail?: string
  • Optional title?: string

Default

true

Example

// 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'
}
});