WhatsApp Token

WhatApp Cloud API requires a valid token to send any message using the Cloud API.

 

Facebook provides a Test WhatsApp phone number that allows to send messages up to 5 phone numbers. You can override later this limitation registering your own phone number.

 

The WhatsApp provide a Temporary Access Token that will be valid for 23 hours. This token must be configured in TsgcWhatsApp_Client component to allow to send messages.

 

 

oClient := TsgcWhatsapp_Client.Create(nil);
oClient.WhatsappOptions.Token := 'EAAO4OpgZAs98BAGj3nCFGr...ZB2t8mmLB2LRXJkte2Y5PMNh2';

 

If you need a long valid token, you can create (or update) a System User and generate a new Token with the  whatsapp_business_messaging permission. This will allow to send and receive WhatsApp messages without updating the Token every 23 hours.