/v1/account
The account
node is for registering your WhatsApp Business API client.
This document covers:
You must use the admin
account to register the application.
To use the WhatsApp Business API, you must first authenticate your WhatsApp Business API client with the server and receive a token that enables you to access the service.
See the Login and Authentication documentation for more information about authentication.
To register, you must have a valid phone number and the base64-encoded certificate associated with that phone number.
See the Phone Number guide for information about supported types of phone numbers.
See Connect Your Phone Number to Your WhatsApp Business Account for instructions on adding a phone number to your WhatsApp business account. A display name assigned to a phone number must be approved by the WhatsApp team before downloading the base64-encoded certificate.
A base64-encoded certificate string is generated for you and is used for validation during WhatsApp Business API client registration.
cert
parameter when registering with the account
endpoint.See the Display Name documentation for more information.
Submit your phone number and base64-encoded certificate string to request your registration code. You can receive your code via either SMS or voice call.
Use the /v1/account
endpoint to request your registration code.
POST /v1/account { "cc": "your-country-code", "phone_number": "your- phone-number-without-country-code", "method": "sms" | "voice", "cert": "your-verified-name-cert-in-base64", "pin": "your-existing-6-digit-pin" # required if two-factor verification is enabled }
Name | Required | Description |
---|---|---|
| Yes | Numerical country code for the phone number you are registering |
| Yes | Phone number you are registering, without the country code or plus symbol ( |
| Yes | Method of receiving your registration code |
| Yes | Base64-encoded certificate |
| No | Existing 6-digit PIN — This is only required when two-factor verification is enabled on this account. |
Depending on the response received, the registration procedure can be considered complete or require another step to complete. If successful, you will receive one of the following HTTP status codes. Follow the instructions that match the response you received:
201 Created
— The account already exists. You are already registered, so you do not need to do anything else.202 Accepted
— The account does not exist. Depending on the method selected in the request, check your SMS or voice number for the registration code. This response will include a returned payload that contains the vname
decoded from the cert
parameter for you to confirm the right display name is being set. If correct, proceed to the Completing Your Account Registration section to complete registration.{ "account": [{ "vname": "decoded-vname-from-cert" }] }
If any errors are returned, refer to Error and Status Messages for more information.
Once you have received the registration code via your specified method (i.e., SMS or voice), complete your account registration by sending an API call to the /v1/account/verify
endpoint:
POST /v1/account/verify { "code": "your-registration-code-received-by-sms-or-voice-call" }
If successful, the response will return the HTTP status 201 Created
with no payload object in response body.
If any errors are returned, refer to Error and Status Messages for more information.
If you are re-registering your account, the Coreapp needs to be restarted once registration is complete.