WhatsApp Business Account Phone Number Verification - Verify Code API | Developer Documentation
WhatsApp Business Account Phone Number Verification - Verify Code API
Copy for LLM
Version
API for verifying phone number verification codes for WhatsApp Business Account phone numbers.
This endpoint allows businesses to verify phone number verification codes sent during the
phone number registration or verification process.
Base URL
https://graph.facebook.com |
Endpoints
POST /{Version}/{Phone-Number-ID}/verify_code
Verify a phone number verification code for a WhatsApp Business Account phone number.
This endpoint is used to complete the phone number verification process by submitting
the verification code received via SMS or voice call.
Use Cases:
Complete phone number verification during initial setup
Verify phone number ownership for messaging capabilities
Finalize phone number registration process
Complete phone number migration verification
Rate Limiting:
Verification attempts are rate-limited to prevent abuse. Failed attempts may result
in temporary blocking. Use appropriate retry logic with exponential backoff.
Security:
Verification codes are time-limited (typically 10 minutes) and single-use.
Multiple failed attempts may trigger additional security measures.
Request Syntax
POST /{Version}/{Phone-Number-ID}/verify_code
Try it
Select language
curl --request POST \
--url 'https://graph.facebook.com/{Version}/{Phone-Number-ID}/verify_code' \
--header 'Authorization: Bearer <Token>' \
--header 'Content-Type: application/json' \
--data '{
"code": "123456"
}'Select status code
{
"successful_verification": {
"summary": "Successful verification response",
"value": {
"success": true,
"id": "1234567890123456"
}
}
}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
The WhatsApp Business Account phone number ID that needs verification.
This ID is provided when you add a phone number to your WhatsApp Business Account.
Request BodyRequired
Content Type: application/json
Schema: VerifyCodeRequest
Show child attributes
VerifyCodeRequest
codestring·required
The verification code received via SMS or voice call
Responses
Verify a phone number verification code for a WhatsApp Business Account phone number.
This endpoint is used to complete the phone number verification process by submitting
the verification code received via SMS or voice call.
Use Cases:
Complete phone number verification during initial setup
Verify phone number ownership for messaging capabilities
Finalize phone number registration process
Complete phone number migration verification
Rate Limiting:
Verification attempts are rate-limited to prevent abuse. Failed attempts may result
in temporary blocking. Use appropriate retry logic with exponential backoff.
Security:
Verification codes are time-limited (typically 10 minutes) and single-use.
Multiple failed attempts may trigger additional security measures.
200
Successfully verified the phone number verification code
Content Type: application/json
Schema: VerifyCodeResponse
Show child attributes
VerifyCodeResponse
successboolean·required
Indicates whether the verification code was successfully verified
idstring
The phone number ID that was verified
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 - Invalid or expired verification code
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
curl --request POST \
--url 'https://graph.facebook.com/{Version}/{Phone-Number-ID}/verify_code' \
--header 'Authorization: Bearer <Token>' \
--header 'Content-Type: application/json' \
--data '{
"code": "123456"
}'Select status code
{
"successful_verification": {
"summary": "Successful verification response",
"value": {
"success": true,
"id": "1234567890123456"
}
}
}Authentication
Scheme | Type | Location |
bearerAuth | HTTP Bearer | Header: Authorization |
Usage Examples
bearerAuth:
Include
Authorization: Bearer your-token-here in request headersGlobal Authentication Requirements
All endpoints require:
bearerAuth
No comments to display
No comments to display