How to Create an Access Token for WhatsApp API
This guide explains how to create a permanent access token to make calls to the WhatsApp API as an authenticated user.
- Inside your Facebook dashboard, Go to Business Settings > Users > System Users. Click on the Add button to create a new system user.
Give your system user a unique username and set the role to Admin. Click on Create System user to continue.
- You'll be redirected to the system user's profile page. Click on Generate New Token to generate a permanent access token for your system user.
- Select your app name from the dropdown and enable the following permissions.
- whatsapp_business_management
- whatsapp_business_messaging
Click on Generate Token, and an access token will be generated for your system user. Please copy the access token in your notepad as it will not be visible again in your Facebook dashboard.
Unlike the temporary access token, this permanent access token will never expire unless you manually revoke it.
Add Assets to WhatsApp Cloud API
While on the System Users page, click on Add Assets to assign your app to the system user.
Go to the Apps tab and select your app from the list. Turn on the Full Control > Manage App option and click on Save Changes.
Your app is now ready to send WhatsApp messages. You can use this permanent access token and the business account ID to integrate WhatsApp with Document Studio.