rocket
Meet
Merchant API
- the official successor to Content API for Shopping.
update
Get the latest
on new Merchant API features, bug fixes, and updates.
add_alert
Note: Content API for Shopping will be sunset on August 18, 2026.
Method: accounts.verifyphonenumber
Stay organized with collections
Save and categorize content based on your preferences.
Validates verification code to verify phone number for the account. If successful this will overwrite the value of accounts.businessinformation.phoneNumber
. Only verified phone number will replace an existing verified phone number.
HTTP request
POST https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/accounts/{accountId}/verifyphonenumber
Path parameters
Parameters |
merchantId |
string (int64 format)
Required. The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.
|
accountId |
string (int64 format)
Required. The ID of the account.
|
Request body
The request body contains data with the following structure:
JSON representation |
{
"verificationId": string,
"verificationCode": string,
"phoneVerificationMethod": enum (PhoneVerificationMethod )
} |
Fields |
verificationId |
string
The verification ID returned by requestphoneverification .
|
verificationCode |
string
The verification code that was sent to the phone number for validation.
|
phoneVerificationMethod |
enum (PhoneVerificationMethod )
Verification method used to receive verification code.
|
Response body
Response message for the accounts.verifyphonenumber method.
If successful, the response body contains data with the following structure:
JSON representation |
{
"verifiedPhoneNumber": string
} |
Fields |
verifiedPhoneNumber |
string
Verified phone number if verification is successful. This phone number can only be replaced by another verified phone number.
|
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/content
For more information, see the OAuth 2.0 Overview.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-02-25 UTC.
[null,null,["Last updated 2025-02-25 UTC."],[[["\u003cp\u003eVerifies a phone number for a Google Merchant Center account using a verification code.\u003c/p\u003e\n"],["\u003cp\u003eRequires a \u003ccode\u003everificationId\u003c/code\u003e, \u003ccode\u003everificationCode\u003c/code\u003e, and \u003ccode\u003ephoneVerificationMethod\u003c/code\u003e in the request body.\u003c/p\u003e\n"],["\u003cp\u003eIf successful, the API returns the \u003ccode\u003everifiedPhoneNumber\u003c/code\u003e in the response.\u003c/p\u003e\n"],["\u003cp\u003eUpdates the \u003ccode\u003eaccounts.businessinformation.phoneNumber\u003c/code\u003e with the verified phone number.\u003c/p\u003e\n"],["\u003cp\u003eRequires the \u003ccode\u003ehttps://www.googleapis.com/auth/content\u003c/code\u003e authorization scope.\u003c/p\u003e\n"]]],["This describes how to verify a phone number for a Google account. The process involves sending a `POST` request to a specific URL, including the managing account's and the target account's IDs in the path. The request body needs a `verificationId`, `verificationCode`, and `phoneVerificationMethod`. Upon successful verification, the response will include the `verifiedPhoneNumber`, which overwrites the existing number and can only be replaced by another verified number. This action requires authorization through OAuth scopes.\n"],null,["# Method: accounts.verifyphonenumber\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n - [JSON representation](#body.VerifyPhoneNumberResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nValidates verification code to verify phone number for the account. If successful this will overwrite the value of `accounts.businessinformation.phoneNumber`. Only verified phone number will replace an existing verified phone number.\n\n### HTTP request\n\n`POST https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/accounts/{accountId}/verifyphonenumber`\n\n### Path parameters\n\n| Parameters ||\n|--------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `merchantId` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` Required. The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. |\n| `accountId` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` Required. The ID of the account. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"verificationId\": string, \"verificationCode\": string, \"phoneVerificationMethod\": enum (/shopping-content/reference/rest/v2.1/PhoneVerificationMethod) } ``` |\n\n| Fields ||\n|---------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `verificationId` | `string` The verification ID returned by `requestphoneverification`. |\n| `verificationCode` | `string` The verification code that was sent to the phone number for validation. |\n| `phoneVerificationMethod` | `enum (`[PhoneVerificationMethod](/shopping-content/reference/rest/v2.1/PhoneVerificationMethod)`)` Verification method used to receive verification code. |\n\n### Response body\n\nResponse message for the accounts.verifyphonenumber method.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------|\n| ``` { \"verifiedPhoneNumber\": string } ``` |\n\n| Fields ||\n|-----------------------|----------------------------------------------------------------------------------------------------------------------------------------|\n| `verifiedPhoneNumber` | `string` Verified phone number if verification is successful. This phone number can only be replaced by another verified phone number. |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/content`\n\nFor more information, see the [OAuth 2.0 Overview](/identity/protocols/OAuth2)."]]