Token Store using file
// Example of typescript with FileTokenStoreimport * as wppconnect from '@wppconnect-team/wppconnect';const myTokenStore = new wppconnect.tokenStore.FileTokenStore({// decodeFunction: JSON.parse,// encodeFunction: JSON.stringify,// encoding: 'utf8',// fileExtension: '.my.ext',// path: './a_custom_path',});wppconnect.create({ session: 'mySession', tokenStore: myTokenStore,});wppconnect.create({ session: 'otherSession', tokenStore: myTokenStore,}); Copy
// Example of typescript with FileTokenStoreimport * as wppconnect from '@wppconnect-team/wppconnect';const myTokenStore = new wppconnect.tokenStore.FileTokenStore({// decodeFunction: JSON.parse,// encodeFunction: JSON.stringify,// encoding: 'utf8',// fileExtension: '.my.ext',// path: './a_custom_path',});wppconnect.create({ session: 'mySession', tokenStore: myTokenStore,});wppconnect.create({ session: 'otherSession', tokenStore: myTokenStore,});
Return the session data if exists
Name of session
A liste of avaliable sessions
Remove the session
Token was removed
Store the session token data
Session token data
Token Store using file