Step 1: Log in to Your Facebook Developer Account
Visit the Facebook Developer website and log in to your account to access the developer tools.
Step 2: Choose Your App
Once logged in, you’ll encounter a screen displaying your apps. Click on the specific app you have created, as illustrated below.
Step 3: Access WhatsApp Settings
Upon clicking on your app, you’ll be directed to the next screen. Here, select “WhatsApp” and then navigate to “Getting Started” to obtain the temporary access token. Copy the temporary access token for future use.
Step 4: Utilize Facebook’s Access Token Tool
Proceed to Facebook’s Access Token Tool by clicking on the “Access Token Tool” link available in the “Useful Links” section on the right side of the screen.
Step 5: Verify and Extend Access Token
Paste the short-lived access token into the “Access Token” field and click “Debug.”
Step 6: Extend Access Token Duration
On the “Access Token Debugger” page, locate and click on the “Extend Access Token” button.
Step 7: Obtain Long-Lived Access Token
Copy the new long-lived access token displayed in the “Access Token” field. Keep in mind that this long-lived access token has a validity period of 60 days of inactivity or until the user alters their password. Additionally, it will expire if the user revokes the app’s permissions. In such instances, follow the same steps to generate a new long-lived access token.