If you want to use Account Linking on your bot, you can subscribe to the account_linking event with your bot instance. For example:
account_linking
bot
bot.on('account_linking', (payload, chat) => { const status = payload.account_linking.status; // status will be 'linked' or 'unlinked' });
Your payload will have the format specified in the Account Linking Documentation
payload
And to send a Login or Logout button, you can use any of the methods provided by bootbot like sendButtonTemplate or sendGenericTemplate. For example:
sendButtonTemplate
sendGenericTemplate
chat.sendGenericTemplate([{ "title": "Welcome to M-Bank", "image_url": "http://www.example.com/images/m-bank.png", "buttons": [{ "type": "account_link", "url": "https://www.example.com/oauth/authorize" }] }]);
There was an error while loading. Please reload this page.