How to get permanent token for using WhatsApp cloud API?
You need to set up a system user as the admin of your app. You can then generate never expiring access tokens for this system user.
Step by step guide to set it up:
- Add a system user to your facebook app if it doesn’t exist yet. Make sure it has the
admin
role.
- On the same page, in the “Assigned Assets” section, check whether your app is listed here. If not, add your app via the “Add asset” button, granting “Full control” over your app.
- Now click the “Generate new token” button for above system user which reveals a “Generate token” popup. Select the 2 permissions
whatsapp_business_management
andwhatsapp_business_messaging
and confirm
- A new access token is presented to you as a link. Click it and then store the generated token safely as it will not be stored for you by facebook. This token will not expire.
- Add the system user to your Whatsapp account in the “People” section, granting “Full control” over your Whatsapp account.
Reference : Learn how to create a permanent token
Was this documentation helpful?
YesNo
Thanks! it worked