WhatsApp API- Generate a Permanent Access Token Tutorial
Creating a developers account
Make sure You have an active Facebook account.
Step 1: Login and Go to https://developers.facebook.com/
Step 2: Click on Get Started on above screen. And create a developers account.
By Clicking on Continue You must agree to https://developers.facebook.com/terms/ and https://developers.facebook.com/devpolicy/
Step 3: Enter a developer’s email which is not associated with a fb account previously.
Step 4: Enter the code sent on your email.
Step 5: Select your role and Complete registration.
Create App
Step 6: Click on Create App button.
Step 6: Select App type and click on next. I have checked business.
Step 8: Provide App basic information.
Setup WhatsApp
Step 8: Now , you can have a App Id , Click on Setup button for WhatsApp.
Step 9: Create or Select a Meta Business Account.
You must read FB terms for Whatsapp business : https://www.whatsapp.com/legal/FB-terms-whatsapp-business
You must read Hosting Terms for Cloud API https://www.facebook.com/legal/Meta-Hosting-Terms-Cloud-API
One Need to create a business account
Step 10: Create a Temporary Access Token.
See in above screen we have Temporary access token which will be valid for 23 hours. A temporary Phone Number ID and WhatsApp Business Account ID , we obviously can add our Custom Phone number , which we will show later on.
Step 11: Getting Started, Click on Add Phone Number.
Step 12: Fill in your business information.
You’ll receive an email to verify it.
Generate the permanent access token
Step 13: One can add Administrators and developers to the app below.
Now Open the developers account of the added user , he must have got a notification to accept from this image.
In the above Roles screen , there is an option to Edit roles in Business Manager.
Step 14: One must have a fb account, in order to be added into the above role enter either fbid or username.
Now Open the developers account of the added user , he must have got a notification to accept from this image.
In the above Roles screen , there is an option to Edit roles in Business Manager.
Click on the Edit roles in Business Manager button, it will open the Business Settings Page of the App.
By selecting People one can have Admin access Or Employee Access, with developer role this will be useful in creating permanent token access. The maximum number of admin system user limit.
Step 16: You need to enter a mail id on widely accepted extensions, like .in , .com . It won’t take mail id created on rare domain extensions
This business has reached maximum number of admin system user limit. The maximum number of admin system user that you could have is 1 . You can use your admin role to generate the permanent access token.
Step 16: By Clicking on Add Assets, one can assign Apps to the Particular role.
Assign assets to App
Step17: One Can Generate New Permanent Token by Clicking on the below button.
Step18: Select the appropriate business app and select below permissions
√ business_management
√whatsapp_business_messaging
√ whatsapp_business_management
Click on Generate Token Button
Step 19: Copy and Save above token in an appropriate place, as fb doesn’t store it anywhere. Now you have Permanent token and you can send WA API Messages