Follow this step-by-step guide to generate a WhatsApp permanent token for seamless Business API integration. Powered by Mentalok.io.

Why Create a WhatsApp Permanent Token?

A permanent token ensures uninterrupted access to the WhatsApp Business API, eliminating the need for frequent token renewals. This guide simplifies the process using Meta Business Suite.

Step-by-Step Guide to Create WhatsApp Permanent Token

  1. Access Meta Business Suite: Navigate to business.facebook.com.

  2. Open Business Settings: Click the Business Settings button in the bottom left corner.

  3. Select Your App: Choose the correct application from the dropdown menu under the page title.

  4. Go to System Users: In the sidebar, click Users > System Users.

  5. Create a System User: Click Add, enter a username, and set the role to Admin. Click Create System User.

  6. Generate Token: Select the new system user, click Generate New Token, and choose your app.

  7. Set Token Expiry: Select Never for a permanent token.

  8. Verify Permissions: Scroll to the bottom and ensure whatsapp_business_management and whatsapp_business_messaging are checked.

  9. Copy Token: Click Generate Token, copy the token, and store it securely.

Test Your Token with a Demo Message

Use the cURL commands below to send a demo message via the WhatsApp API. Replace YOUR_ACCESS_TOKENYOUR_PHONE_NUMBER_ID, and RECIPIENT_PHONE_NUMBER with your details.

For YOUR_PHONE_NUMBER_ID , make sure you have phone number added first!

For your Phone Number ID, you go get it by going to WhatsApp Manager
Then go to Phone Number, you can manage your WhatsApp Mobile and add your number here first. If you already have the phone number.

If you phone number already exist, go to WhatsApp Manager.
Click WhatsApp -> API Setup on the left side menu, then you can see the Phone number ID and WhatsApp Business Account ID for copy.

For Windows (Command Prompt)

curl -i -X POST ^
  https://graph.facebook.com/v20.0/YOUR_PHONE_NUMBER_ID/messages ^
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" ^
  -H "Content-Type: application/json" ^
  -d "{\"messaging_product\": \"whatsapp\", \"to\": \"RECIPIENT_PHONE_NUMBER\", \"type\": \"text\", \"text\": {\"body\": \"Hello, this is a test message!\"}}"

For macOS (Terminal)

curl -i -X POST \
  https://graph.facebook.com/v20.0/YOUR_PHONE_NUMBER_ID/messages \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"messaging_product": "whatsapp", "to": "RECIPIENT_PHONE_NUMBER", "type": "text", "text": {"body": "Hello, this is a test message!"}}'

Note: Find your PHONE_NUMBER_ID in the WhatsApp settings of your app on the Meta Developer Portal. Ensure the recipient number includes the country code (e.g., +1234567890).

Secure Your Token

Store your token in a secure location, such as a password manager or a secure vault. Never share it publicly to prevent unauthorized access.

Need Help?

Explore more automation solutions with Mentalok.io, your partner in AI-driven workflows. Contact us for expert guidance on WhatsApp API integrations.

MentalokAI

Discover the power of MentalokAI, your all-in-one platform to effortlessly manage a flood of clients across every messaging channel.

Imagine a world where each client enjoys their own membership account, racking up loyalty points and redeeming exclusive rewards with ease. With just a few clicks, you can broadcast irresistible promotions, share exciting product updates, or announce your latest events to everyone, everywhere. Plus, schedule your messages to go out at the perfect moment, streamlining your workflow and supercharging your business’s revenue.

Don’t wait—dive into MentalokAI today and transform the way you connect with your clients!

Try MentalokAI now!