> ## Documentation Index
> Fetch the complete documentation index at: https://whatsapp-docs.kap.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Phone number verification request code api

# WhatsApp Cloud API - Phone Number Verification Request Code API

Copy for LLM

[View as Markdown](https://developers.facebook.com/documentation/business-messaging/whatsapp/reference/whatsapp-business-phone-number/phone-number-verification-request-code-api/v23.0.md/)

Version

v23.0

API for requesting verification codes for WhatsApp Business phone numbers.

This endpoint allows businesses to request verification codes via SMS or voice call

for phone number verification.

## Base URL

\| [https://graph.facebook.com](https://graph.facebook.com) |

## Endpoints

\| POST | [/{Version}/{Phone-Number-ID}/request\_code](https://developers.facebook.com/documentation/business-messaging/whatsapp/reference/whatsapp-business-phone-number/phone-number-verification-request-code-api#post-version-phone-number-id-request-code) |

***

## POST /{Version}/{Phone-Number-ID}/request\_code

Request a verification code for a WhatsApp Business phone number via SMS or voice call.

This is the first step in the phone number verification process.

Use Cases:

Initial verification of newly added phone numbers

Re-verification when phone number status requires it

Switching between SMS and voice verification methods

Rate Limiting:

Standard Graph API rate limits apply. Additional rate limiting may be enforced

for verification code requests to prevent abuse.

Security:

Verification codes are sent only to the registered phone number and expire

after a short time period. Multiple failed attempts may result in temporary blocking.

### Request Syntax

**POST**/{Version}/{Phone-Number-ID}/request\_code

Select language

cURLJavaScriptPython

***

```
curl --request POST \
  --url 'https://graph.facebook.com/{Version}/{Phone-Number-ID}/request_code' \
  --header 'Authorization: Bearer <Token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "code_method": "SMS",
  "language": "en_US"
}'
```

Select status code

200400401403404422429500

***

```
\{
  "success_response": {
    "summary": "Successful verification code request",
    "value": {
      "success": true
    }
  }
}
```

Header Parameters

***

User-Agentstring

The user agent string identifying the client software making the request.

Authorizationstring·required

Bearer token for API authentication. This should be a valid access token obtained through the appropriate OAuth flow or system user token.

Content-TypeOne of "application/json", "application/x-www-form-urlencoded", "multipart/form-data"·required

Media type of the request body

Path Parameters

***

Versionstring·required

Graph API version to use for this request. Determines the API behavior and available features.

Phone-Number-IDstring·required

Your WhatsApp Business phone number ID. This ID represents the phone number

status entity (EntWhatsAppBusinessAccountToNumberCurrentStatus) and can be

obtained from your WhatsApp Business Account phone numbers list.

Request BodyRequired

***

Verification code request parameters

Content Type: application/json

Schema: RequestCodeRequest

Show child attributes

***

RequestCodeRequest

***

code\_methodOne of "SMS", "VOICE"·required

Method for receiving the verification code

***

languagestring·required

Language locale for the verification message

Responses

***

Request a verification code for a WhatsApp Business phone number via SMS or voice call.

This is the first step in the phone number verification process.

Use Cases:

Initial verification of newly added phone numbers

Re-verification when phone number status requires it

Switching between SMS and voice verification methods

Rate Limiting:

Standard Graph API rate limits apply. Additional rate limiting may be enforced

for verification code requests to prevent abuse.

Security:

Verification codes are sent only to the registered phone number and expire

after a short time period. Multiple failed attempts may result in temporary blocking.

200

Successfully requested verification code

Content Type: application/json

Schema: RequestCodeResponse

Show child attributes

***

RequestCodeResponse

***

successboolean·required

Indicates whether the verification code request was successful

400

Bad Request - Invalid parameters or malformed request

Content Type: application/json

Schema: GraphAPIError

Show child attributes

***

GraphAPIError

***

errorobject·required

Show child attributes

***

messagestring·required

Human-readable error message

***

typestring·required

Error category type

***

codeinteger·required

Numeric error code

***

error\_subcodeinteger

More specific error subcode when available

***

fbtrace\_idstring

Unique identifier for debugging and support requests with Meta

***

is\_transientboolean

Indicates whether this error is temporary and the request should be retried

***

error\_user\_titlestring

User-friendly error title for display purposes

***

error\_user\_msgstring

User-friendly error message for display purposes

401

Unauthorized - Invalid or missing access token

Content Type: application/json

Schema: GraphAPIError

Show child attributes

***

GraphAPIError

***

errorobject·required

Show child attributes

***

messagestring·required

Human-readable error message

***

typestring·required

Error category type

***

codeinteger·required

Numeric error code

***

error\_subcodeinteger

More specific error subcode when available

***

fbtrace\_idstring

Unique identifier for debugging and support requests with Meta

***

is\_transientboolean

Indicates whether this error is temporary and the request should be retried

***

error\_user\_titlestring

User-friendly error title for display purposes

***

error\_user\_msgstring

User-friendly error message for display purposes

403

Forbidden - Insufficient permissions or access denied

Content Type: application/json

Schema: GraphAPIError

Show child attributes

***

GraphAPIError

***

errorobject·required

Show child attributes

***

messagestring·required

Human-readable error message

***

typestring·required

Error category type

***

codeinteger·required

Numeric error code

***

error\_subcodeinteger

More specific error subcode when available

***

fbtrace\_idstring

Unique identifier for debugging and support requests with Meta

***

is\_transientboolean

Indicates whether this error is temporary and the request should be retried

***

error\_user\_titlestring

User-friendly error title for display purposes

***

error\_user\_msgstring

User-friendly error message for display purposes

404

Not Found - Phone number ID does not exist or is not accessible

Content Type: application/json

Schema: GraphAPIError

Show child attributes

***

GraphAPIError

***

errorobject·required

Show child attributes

***

messagestring·required

Human-readable error message

***

typestring·required

Error category type

***

codeinteger·required

Numeric error code

***

error\_subcodeinteger

More specific error subcode when available

***

fbtrace\_idstring

Unique identifier for debugging and support requests with Meta

***

is\_transientboolean

Indicates whether this error is temporary and the request should be retried

***

error\_user\_titlestring

User-friendly error title for display purposes

***

error\_user\_msgstring

User-friendly error message for display purposes

422

Unprocessable Entity - Request parameters are valid but cannot be processed

Content Type: application/json

Schema: GraphAPIError

Show child attributes

***

GraphAPIError

***

errorobject·required

Show child attributes

***

messagestring·required

Human-readable error message

***

typestring·required

Error category type

***

codeinteger·required

Numeric error code

***

error\_subcodeinteger

More specific error subcode when available

***

fbtrace\_idstring

Unique identifier for debugging and support requests with Meta

***

is\_transientboolean

Indicates whether this error is temporary and the request should be retried

***

error\_user\_titlestring

User-friendly error title for display purposes

***

error\_user\_msgstring

User-friendly error message for display purposes

429

Too Many Requests - Rate limit exceeded

Content Type: application/json

Schema: GraphAPIError

Show child attributes

***

GraphAPIError

***

errorobject·required

Show child attributes

***

messagestring·required

Human-readable error message

***

typestring·required

Error category type

***

codeinteger·required

Numeric error code

***

error\_subcodeinteger

More specific error subcode when available

***

fbtrace\_idstring

Unique identifier for debugging and support requests with Meta

***

is\_transientboolean

Indicates whether this error is temporary and the request should be retried

***

error\_user\_titlestring

User-friendly error title for display purposes

***

error\_user\_msgstring

User-friendly error message for display purposes

500

Internal Server Error - Unexpected server error

Content Type: application/json

Schema: GraphAPIError

Show child attributes

***

GraphAPIError

***

errorobject·required

Show child attributes

***

messagestring·required

Human-readable error message

***

typestring·required

Error category type

***

codeinteger·required

Numeric error code

***

error\_subcodeinteger

More specific error subcode when available

***

fbtrace\_idstring

Unique identifier for debugging and support requests with Meta

***

is\_transientboolean

Indicates whether this error is temporary and the request should be retried

***

error\_user\_titlestring

User-friendly error title for display purposes

***

error\_user\_msgstring

User-friendly error message for display purposes

Select language

cURLJavaScriptPython

***

```
curl --request POST \
  --url 'https://graph.facebook.com/{Version}/{Phone-Number-ID}/request_code' \
  --header 'Authorization: Bearer <Token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "code_method": "SMS",
  "language": "en_US"
}'
```

Select status code

200400401403404422429500

***

```
\{
  "success_response": {
    "summary": "Successful verification code request",
    "value": {
      "success": true
    }
  }
}
```

## Authentication

\| **Scheme** | **Type** | **Location** |
\| bearerAuth | HTTP Bearer | Header: Authorization |

### Usage Examples

bearerAuth:

Include Authorization: Bearer your-token-here in request headers

### Global Authentication Requirements

All endpoints require:

bearerAuth

Did you find this page helpful?

![Thumbs up icon](https://static.xx.fbcdn.net/rsrc.php/yR/r/OEXJ0_DJeZv.svg)

![Thumbs down icon](https://static.xx.fbcdn.net/rsrc.php/yb/r/qKPgNVNeatU.svg)

***
