WhatsApp Business Pre-Verified Phone Number - Verify Code API
Copy for LLM View as Markdown Version v23.0 API for verifying OTP codes for WhatsApp Business Pre-Verified Phone Numbers. This endpoint allows businesses to verify OTP codes that were sent to pre-verified phone numbers during the phone number verification process.Base URL
| https://graph.facebook.com |Endpoints
| POST | ///verify_code |POST ///verify_code
Verify the OTP code received for a pre-verified phone number to complete the verification process. This endpoint validates the code and updates the verification status of the phone number. Use Cases: Complete phone number verification during WhatsApp Business onboarding Verify ownership of phone numbers for business messaging Enable phone numbers for WhatsApp Business API usage Rate Limiting: This endpoint has specific rate limits to prevent abuse: 125 requests per hour for business use cases Standard Graph API rate limits also apply Code Validation: Codes are time-sensitive and expire after a set period Each code can only be used once Invalid or expired codes will result in verification failure Error Handling: Invalid codes return 400 Bad Request Expired codes return 422 Unprocessable Entity Rate limit exceeded returns 429 Too Many RequestsRequest Syntax
POST///verify_code Try it Select language cURLJavaScriptPythonUser-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. Path Parameters
Versionstring·required Graph API version to use for this request. Determines the API behavior and available features. Pre-Verified-Phone-Number-IDstring·required Your Pre-Verified Phone Number ID. This ID is provided when you create the pre-verified phone number and can be found in your WhatsApp Business Manager or through phone number APIs. Request BodyRequired
Verification code details Content Type: application/json Schema: VerifyCodeRequest Show child attributes
VerifyCodeRequest
codestring·required The numeric verification code received via SMS or voice call. This code is provided after calling the request_code endpoint. Responses
Verify the OTP code received for a pre-verified phone number to complete the verification process. This endpoint validates the code and updates the verification status of the phone number. Use Cases: Complete phone number verification during WhatsApp Business onboarding Verify ownership of phone numbers for business messaging Enable phone numbers for WhatsApp Business API usage Rate Limiting: This endpoint has specific rate limits to prevent abuse: 125 requests per hour for business use cases Standard Graph API rate limits also apply Code Validation: Codes are time-sensitive and expire after a set period Each code can only be used once Invalid or expired codes will result in verification failure Error Handling: Invalid codes return 400 Bad Request Expired codes return 422 Unprocessable Entity Rate limit exceeded returns 429 Too Many Requests 200 Successfully verified the OTP code Content Type: application/json Schema: VerifyCodeResponse Show child attributes
VerifyCodeResponse
successboolean·required Indicates whether the code verification 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 - Pre-Verified 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 - Code is invalid, expired, or already used 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

