Account Migration

This page is only relevant for developers that have previously used our On-Premises API and need to migrate their account.

Use /PHONE_NUMBER_ID/register to migrate your WhatsApp Business Accounts from your current On-Premises deployment to the new Cloud-Based API.

EndpointAuthentication

/PHONE_NUMBER_ID/register

Business Solution Providers (BSPs) must authenticate themselves with an access token with the whatsapp_business_management permission.

Migrate

To migrate your account, make a POST call to the PHONE_NUMBER_ID/register endpoint and include the parameters listed below.

Your request could take as long as 15 seconds to finish. During this period, your on-premise deployment is automatically disconnected from WhatsApp server and shutdown; the business account will start up in the cloud-hosted service at the same time. After the request finishes successfully, you can send messages immediately.

Parameters

NameDescription

messaging_product

Required.

Messaging service used for the request. In this case, use “WhatsApp”.

pin

Required.

A 6-digit pin you have previously set up. If you use the wrong pin, your on-premise deployment will be down and will be disconnected from the WhatsApp servers.


If you haven't set up or you have disabled two-step verification, provide a random 6-digit pin in the request, and this will be used to enable two-step verification in the WhatsApp Business Cloud-Based API.

backup.data

Required.

The data value you get when you backup your on-premise deployment. This contains the account registration info and application settings.


See Backup and Restore to backup your on-premise implementation.

backup.password

Required.

The password you used in the backup API of your On-Premises deployment.

Example

Sample request:

curl -X POST \ 
  'https://graph.facebook.com/v14.0/FROM_PHONE_NUMBER_ID/register' \
 -H 'Authorization: Bearer SYSTEM_USER_ACCESS_TOKEN' \
 -d '{
    "messaging_product": "whatsapp",
    "pin": "6_DIGIT_PIN",
    “backup”: {
      "password": "PASSWORD",
      "data": "BACKUP_DATA"
    }
  }'

Sample response:

{
  "success": "true"
}

All API calls require authentication with access tokens.

Developers can authenticate their API calls with the access token generated in App Dashboard > WhatsApp > Getting Started.

Business Solution Providers (BSPs) must authenticate themselves with an access token with the whatsapp_business_messaging and whatsapp_business_management permissions. See Get System User Access Token for information.