Search

Reinhart Previano K.

Do you love to Ctrl-K, Ctrl-/, or / ? Now you can do three of them (>_ )!

No results so far...

Contact Information

• (Updated )

How to properly update your WhatsApp Business account name with Cloud API.

Reinhart Previano Koentjoro's profile picture

Reinhart Previano Koentjoro (@reinhart)

Published on tales from the roothouse

Share Copy Link Print PDF Embed Share to Email Share to SMS Yahoo! Share to Yahoo! Mail Mastodon Share to Mastodon Share to KakaoStory Messenger Share to Messenger Pocket Share to Pocket Flipboard Share to Flipboard Pinterest Share to Pinterest Reddit Share to Reddit Y Combinator Share to Hacker News Odnoklassniki Share to Odnoklassniki Blogger Share to Blogger Pleroma Share to Pleroma Share to Friendica Share to KakaoTalk 1Artboard 1 copy 2 Share to Snapchat Xing Share to Xing Share to Misskey LINE Share to LINE Evernote Share to Evernote WhatsApp Share to WhatsApp LiveJournal Share to Livejournal Diaspora Share to Diaspora Share to Gmail Threads Share to Threads Threema Share to Threema Share to X Tumblr Share to Tumblr Buffer Share to Buffer LinkedIn Share to LinkedIn Mail.Ru Share to mail.ru VK Share to VKontakte Trello Share to Trello Facebook Share to Facebook Bluesky Share to Bluesky Skype Share to Skype Hatena Bookmark Share to Hatena Bookmark! Share via MastodonShare Telegram Share to Telegram WordPress Share to WordPress.com

Embed

This website supports oEmbed. To quickly use oEmbed, just copy this site's link to your oEmbed-supported apps and websites like WordPress.

Alternatively, copy and paste the HTML code below to embed this post in your website.

($_ )! We have made this thing responsive, but recommend at least 512x512 pixels for best results.
<iframe src="http://rootverse.reinhart1010.id/blog/2024/09/03/how-to-properly-update-your-whatsapp-business-account-name-with-cloud-api?embed" height="512" width="512" style="border:none;"><a href="{{ $canonical }}">http://rootverse.reinhart1010.id/blog/2024/09/03/how-to-properly-update-your-whatsapp-business-account-name-with-cloud-api</a></iframe>
Preview

This tutorial requires the use of the command-line interface. For Windows, we recommend instead to use PowerShell instead of the Command Prompt.

Warning: There are three different dashboards to interact with WhatsApp Business Platform. For the purpose of clarity, here's what we really meant about:

The WhatsApp Business platform also consists of different set of credentials as listed below. Here, we only need to use the Access Token, the WhatsApp Phone Number ID (not the Business Account ID), and the WhatsApp Two-Step Verification PIN (more on that later).

  • Access Token: In order to perform HTTP request to WhatsApp Business Platform.
    • The Meta App Dashboard by default allows you to create temporary tokens for use in 24 hours.
    • To create a permanent access token:
      • Ensure that your Facebook account is connected to both the Meta Business Suite (to manage business entities) and Meta App Dashboard (i.e. by registering into the Meta/Facebook Developers programme).
      • Register a new business and Business Assets (i.e. related Facebook pages and Instagram accounts) on Meta Business Suite.
      • Register a new app on Meta App Dashboard
      • Create a new System User on the Business Settings in the Meta Business Suite
      • On the Meta Business Suite, create the Access Token by clicking on Generate Token button on the System User settings, then link them to the desired App.
  • App Secret (as configured in the App Dashboard): Only useful when authenticating received webhooks.
  • Webhook Verify Token: A unique token set by you to be able to verify certain webhook events.
  • WhatsApp Business Account ID: The Facebook Graph API Object ID representing the business account.
    • This ID can be easily grabbed on the Meta App Dashboard, assuming that you have registered the phone number.
  • WhatsApp Phone Number ID: The Facebook Graph API Object ID representing the registered phone number.
    • This ID can be easily grabbed on the Meta App Dashboard, assuming that you have registered the phone number.
  • WhatsApp Two-Step Verification PIN: A 6-digit PIN set by you to secure your WhatsApp business account.

If you are not familiar, the Facebook Graph API introduced an universal ID format for every kinds of object/entities. That means if there is a WhatsApp Business Account ID of 123123123, then it is guaranteed that the number are not used in any other forms of objects, like the WhatsApp Phone Number ID, the Facebook Pages ID, the Instagram Post ID, and so on.

Step 1: Request a display name change on WhatsApp Manager.

You cannot try this feature on the default Test WhatsApp Business Account or any account that has the Display Name change featured disabled for administrative reasons.

Go to WhatsApp Manager > Account Tools > Phone Numbers. Make sure that you are selecting the correct WhatsApp Account on the top-right corner.

A snapshot of the upper right corner of the Meta WhatsApp Manager, with a selection of the active WhatsApp Business Accounts as well as respective Account IDs.

You can also see that there's the "WhatsApp account ID", which is actually your WhatsApp Business Account ID. It is different than WhatsApp Phone Number ID that we need later, as some WhatsApp Business Account are allowed to add more than one phone numbers.

Now, on your desired phone number, change the display name. You can only move to the next step if the new display name is approved.

Step 2: Set up (or update) your WhatsApp Two-Step Verification PIN.

This is the part where we start to use the command-line.

If you never set up those PINs, you can send a request to the WhatsApp Business Cloud API:

Replace the {{ACCESS_TOKEN}}, {{PHONE_NUMBER_ID}} and {{PIN}} with the Access Token, WhatsApp Phone Number ID, and WhatsApp Two-Step Verification PIN respectively.

# Windows (requires PowerShell)
Invoke-WebRequest -Method Post -Body '{ "pin": "{{PIN}}" } -Headers @{ Authorization = "Bearer {{ACCESS_TOKEN}}" } -ContentType 'application/json' https://graph.facebook.com/v20.0/{{PHONE_NUMBER_ID}}

# macOS and Linux (requires curl)
curl -X  POST 'https://graph.facebook.com/v20.0/{{PHONE_NUMBER_ID}}' -H 'Authorization: Bearer {{ACCESS_TOKEN}}' -H 'Content-Type: application/json' -d '{"pin" : "{{PIN}}"}'

Note: We recommend to use the System User Access Token instead of the temporary token generated from the Meta App Dashboard.

Make sure that the server responds with {"success":true}.

Step 3: Trigger the display name change on the WhatsApp Cloud API.

Lastly, we can trigger the following command to apply the display name change.

Replace the {{ACCESS_TOKEN}}, {{PHONE_NUMBER_ID}} and {{PIN}} with the Access Token, WhatsApp Phone Number ID, and WhatsApp Two-Step Verification PIN respectively.

# Windows (requires PowerShell)
Invoke-WebRequest -Method Post -Body '{ "messaging_product": "whatsapp", "pin": "{{PIN}}" } -Headers @{ Authorization = "Bearer {{ACCESS_TOKEN}}" } -ContentType 'application/json' https://graph.facebook.com/v20.0/{{PHONE_NUMBER_ID}}/register

# macOS and Linux (requires curl)
curl 'https://graph.facebook.com/v20.0/{{PHONE_NUMBER_ID}}/register' -H 'Content-Type: application/json' -H 'Authorization: Bearer {{ACCESS_TOKEN}}' -d '{ "messaging_product": "whatsapp", "pin": "{{PIN}}" }'

Make sure that the server responds with {"success":true}.

Share Copy Link Print PDF Embed Share to Email Share to SMS Yahoo! Share to Yahoo! Mail Mastodon Share to Mastodon Share to KakaoStory Messenger Share to Messenger Pocket Share to Pocket Flipboard Share to Flipboard Pinterest Share to Pinterest Reddit Share to Reddit Y Combinator Share to Hacker News Odnoklassniki Share to Odnoklassniki Blogger Share to Blogger Pleroma Share to Pleroma Share to Friendica Share to KakaoTalk 1Artboard 1 copy 2 Share to Snapchat Xing Share to Xing Share to Misskey LINE Share to LINE Evernote Share to Evernote WhatsApp Share to WhatsApp LiveJournal Share to Livejournal Diaspora Share to Diaspora Share to Gmail Threads Share to Threads Threema Share to Threema Share to X Tumblr Share to Tumblr Buffer Share to Buffer LinkedIn Share to LinkedIn Mail.Ru Share to mail.ru VK Share to VKontakte Trello Share to Trello Facebook Share to Facebook Bluesky Share to Bluesky Skype Share to Skype Hatena Bookmark Share to Hatena Bookmark! Share via MastodonShare Telegram Share to Telegram WordPress Share to WordPress.com

Embed

This website supports oEmbed. To quickly use oEmbed, just copy this site's link to your oEmbed-supported apps and websites like WordPress.

Alternatively, copy and paste the HTML code below to embed this post in your website.

($_ )! We have made this thing responsive, but recommend at least 512x512 pixels for best results.
<iframe src="http://rootverse.reinhart1010.id/blog/2024/09/03/how-to-properly-update-your-whatsapp-business-account-name-with-cloud-api?embed" height="512" width="512" style="border:none;"><a href="{{ $canonical }}">http://rootverse.reinhart1010.id/blog/2024/09/03/how-to-properly-update-your-whatsapp-business-account-name-with-cloud-api</a></iframe>
Preview

Reinhart Previano Koentjoro
Reinhart Previano Koentjoro
Citra Manggala Dirgantara
Citra Manggala Dirgantara

A Reinhart company

Products

Company