interface CreateConfig {
    autoClose?: number;
    browser?: Browser | BrowserContext;
    browserArgs?: string[];
    browserWS?: string;
    createPathFileToken?: boolean;
    debug?: boolean;
    deviceName?: string | false;
    deviceSyncTimeout?: number;
    devtools?: boolean;
    disableGoogleAnalytics?: boolean;
    disableWelcome?: boolean;
    folderNameToken?: string;
    googleAnalyticsId?: string;
    headless?: boolean | "shell";
    linkPreviewApiServers?: string[];
    logger?: Logger;
    logQR?: boolean;
    mkdirFolderToken?: string;
    page?: Page;
    phoneNumber?: string;
    poweredBy?: string;
    proxy?: {
        password: string;
        url: string;
        username: string;
    };
    puppeteerOptions?: LaunchOptions;
    sessionToken?: SessionToken;
    tokenStore?: string | TokenStore<SessionToken>;
    updatesLog?: boolean;
    useChrome?: boolean;
    waitForLogin?: boolean;
    whatsappVersion?: string;
}

Hierarchy (view full)

Properties

autoClose?: number

Automatically closes the wppconnect only when scanning the QR code (default 60000 miliseconds, if you want to turn it off, assign 0 or false)

60000
browser?: Browser | BrowserContext

Pass a external browser instance, can be used with electron

browserArgs?: string[]

Parameters to be added into the chrome browser instance

browserWS?: string

If you want to use browserWSEndpoint

createPathFileToken?: boolean

Creates a folder when inserting an object in the client's browser, to work it is necessary to pass the parameters in the function create browserSessionToken

See tokenStore

true
debug?: boolean

Opens a debug session

false
deviceName?: string | false

Define the connected device name in WhatsApp app

'WPPConnect'
deviceSyncTimeout?: number

Automatically closes the wppconnect only when is syncing the device (default 180000 miliseconds, 3 minutes, if you want to turn it off, assign 0 or false)

180000 (3 minutes)
devtools?: boolean

Open devtools by default

false
disableGoogleAnalytics?: boolean

Disable custom Google Analytics

true
disableWelcome?: boolean

Will disable the welcoming message which appears in the beginning

false
folderNameToken?: string

Folder name when saving tokens if tokenStore is 'file'.

'tokens'
googleAnalyticsId?: string

Custom Google Analytics Tracker Id, like 'G-XXXXXXXXXX' collect analytics data to your GA account

null
headless?: boolean | "shell"

Headless chrome

true
linkPreviewApiServers?: string[]

Set custom Link Preview API servers

null
logger?: Logger

Wait for in chat to return a instance of Whatsapp

false
logQR?: boolean

Logs QR automatically in terminal

true
mkdirFolderToken?: string

folder directory tokens, just inside the wppconnect folder, example: { mkdirFolderToken: '/node_modules', } //will save the tokens folder in the node_modules directory

See tokenStore

page?: Page

Pass a external page instance, can be used with electron

phoneNumber?: string

Insert the phone number for connect by link phone, qr code not wil generate

poweredBy?: string

Custom variable for Google Analytics

'WPPConnect'
proxy?: {
    password: string;
    url: string;
    username: string;
}

Define the proxy settings for the connection

Type declaration

  • password: string

    The password for the proxy server

  • url: string

    The URL of the proxy server

  • username: string

    The username for the proxy server

null
puppeteerOptions?: LaunchOptions

Will be passed to puppeteer.launch

sessionToken?: SessionToken

Initial token to log in in WhatsApp. If not passed, the client will get it from tokenStore.

tokenStore?: string | TokenStore<SessionToken>

Token store used to manage token tokenStore

'file'
updatesLog?: boolean

Logs info updates automatically in terminal

true
useChrome?: boolean

If false will use Chromium instance

true
waitForLogin?: boolean

Wait for in chat to return a instance of Whatsapp

false
whatsappVersion?: string

Quando definido, essa opção força o carregamento de uma versão específica do WhatsApp WEB Normalmente, versões mais antigas continuam funcionando por mais um tempo, assim, com essa opção, é possível ter uma janela de tempo maior para se preparar para atualizações. Caso seja definido vazio ou null, será usado a versão atual, ou seja, sem forçar versão específica.

2.2134.x