Google Business Performance API 的
NEW API 方法可擷取單一 API 要求中的多個「DailyMetrics」。
請詳閱
淘汰時間表和從 v4 reportInsights API 方法遷移至 Google Business Profile Performance API 的操作說明。
Method: locations.verify
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
HTTP 要求
POST https://mybusinessverifications.googleapis.com/v1/{name=locations/*}:verify
這個網址使用 gRPC 轉碼語法。
路徑參數
參數 |
name |
string
必要欄位。待驗證地點的資源名稱。
|
要求主體
要求主體的資料會採用以下結構:
JSON 表示法 |
{
"method": enum (VerificationMethod ),
"languageCode": string,
"context": {
object (ServiceBusinessContext )
},
// Union field RequestData can be only one of the following:
"emailAddress": string,
"mailerContact": string,
"phoneNumber": string,
"token": {
object (VerificationToken )
}
// End of list of possible types for union field RequestData .
} |
欄位 |
method |
enum (VerificationMethod )
必要欄位。驗證方法。
|
languageCode |
string
選用設定。BCP 47 語言代碼,代表驗證程序採用的語言。
|
context |
object (ServiceBusinessContext )
選用設定。用於驗證服務商家的額外背景資訊。只有商家類型為 CUSTOMER_LOCATION_ONLY 的地點才需要提供這個屬性。地址驗證會用來傳送明信片,其他方法應與傳遞至 GetVerificationOptions 的方法相同。如果將 INVALID_src 設為其他商家地點類型,就會擲回。
|
聯集欄位 RequestData 。除了顯示資料以外,使用者為特定方法輸入的資料。資料必須與要求的方法相符。如果不需要任何資料,請將此欄位留空。RequestData 只能是下列其中一項: |
emailAddress |
string
選用設定。EMAIL 方法的輸入內容。要接收 PIN 碼的電子郵件地址。 系統僅接受 locations.fetchVerificationOptions 中輸入的電子郵件地址。如果 [EmailVerificationData]
[google.mybusiness-verifications.v1.VerificationOption.EmailVerificationData] 已將 isUserNameEditable 設為 true,客戶可以指定不同的使用者名稱 (local-part),但必須與網域名稱相符。
|
mailerContact |
string
選用設定。ADDRESS 方法的輸入內容。收件者名稱。
|
phoneNumber |
string
選用設定。PHONE_CALL/SMS 方法的輸入欄位:應撥打或接收簡訊的電話號碼。必須是符合資格選項中的其中一組電話號碼。
|
token |
object (VerificationToken )
選用設定。VETTED_PARTNER 方法的輸入內容,可供選取「合作夥伴」使用。未通過審查的帳戶則不需要輸入。與位置相關聯的權杖。與位置相關聯的權杖。
|
回應主體
Verifications.VerifyLocation 的回應訊息。
如果成功,回應主體會含有以下結構的資料:
欄位 |
verification |
object (Verification )
已建立的驗證要求。
|
授權範圍
需要下列 OAuth 範圍:
https://www.googleapis.com/auth/business.manage
詳情請參閱 OAuth 2.0 總覽。
VerificationToken
JSON 表示法 |
{
"tokenString": string
} |
欄位 |
tokenString |
string
憑證字串。
|
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[[["\u003cp\u003eInitiates the verification process for a specified location using various methods like email, phone, address, or a vetted partner token.\u003c/p\u003e\n"],["\u003cp\u003eRequires providing the location's resource name and selecting the desired verification method.\u003c/p\u003e\n"],["\u003cp\u003eOptionally, you can specify language, service business context, and user input data depending on the chosen method.\u003c/p\u003e\n"],["\u003cp\u003eA successful verification request returns a Verification object representing the initiated process.\u003c/p\u003e\n"],["\u003cp\u003eUtilizes the \u003ccode\u003ehttps://www.googleapis.com/auth/business.manage\u003c/code\u003e OAuth scope for authorization.\u003c/p\u003e\n"]]],["This documentation details how to initiate a location verification process via a POST request to `https://mybusinessverifications.googleapis.com/v1/{name=locations/*}:verify`. The request requires a location's resource `name` as a path parameter. The request body uses JSON and specifies the verification `method`, optional `languageCode` and `context` and the `RequestData` which could include an `emailAddress`, `mailerContact`, `phoneNumber`, or a `token`. A successful request returns a `verification` object in the JSON response body. An `Authorization scope` is required.\n"],null,["# Method: locations.verify\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.VerifyLocationResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [VerificationToken](#VerificationToken)\n - [JSON representation](#VerificationToken.SCHEMA_REPRESENTATION)\n\nStarts the verification process for a location.\n\n### HTTP request\n\n`POST https://mybusinessverifications.googleapis.com/v1/{name=locations/*}:verify`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------|-------------------------------------------------------------|\n| `name` | `string` Required. Resource name of the location to verify. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"method\": enum (/my-business/reference/verifications/rest/v1/VerificationMethod), \"languageCode\": string, \"context\": { object (/my-business/reference/verifications/rest/v1/ServiceBusinessContext) }, // Union field `RequestData` can be only one of the following: \"emailAddress\": string, \"mailerContact\": string, \"phoneNumber\": string, \"token\": { object (/my-business/reference/verifications/rest/v1/locations/verify#VerificationToken) } // End of list of possible types for union field `RequestData`. } ``` |\n\n| Fields ||\n|-----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `method` | `enum (`[VerificationMethod](/my-business/reference/verifications/rest/v1/VerificationMethod)`)` Required. Verification method. |\n| `languageCode` | `string` Optional. The BCP 47 language code representing the language that is to be used for the verification process. |\n| `context` | `object (`[ServiceBusinessContext](/my-business/reference/verifications/rest/v1/ServiceBusinessContext)`)` Optional. Extra context information for the verification of service businesses. It is only required for the locations whose business type is CUSTOMER_LOCATION_ONLY. For ADDRESS verification, the address will be used to send out postcard. For other methods, it should be the same as the one that is passed to GetVerificationOptions. INVALID_ARGUMENT will be thrown if it is set for other types of business locations. |\n| Union field `RequestData`. User input data for specific method in addition to the display data. The data must match the requested method. Leave it empty if no data is needed. `RequestData` can be only one of the following: ||\n| `emailAddress` | `string` Optional. The input for EMAIL method. Email address where the PIN should be sent to. An email address is accepted only if it is one of the addresses provided by locations.fetchVerificationOptions. If the \\[EmailVerificationData\\] \\[google.mybusiness-verifications.v1.VerificationOption.EmailVerificationData\\] has isUserNameEditable set to true, the client may specify a different user name (local-part) but must match the domain name. |\n| `mailerContact` | `string` Optional. The input for ADDRESS method. Contact name the mail should be sent to. |\n| `phoneNumber` | `string` Optional. The input for PHONE_CALL/SMS method The phone number that should be called or be sent SMS to. It must be one of the phone numbers in the eligible options. |\n| `token` | `object (`[VerificationToken](/my-business/reference/verifications/rest/v1/locations/verify#VerificationToken)`)` Optional. The input for VETTED_PARTNER method available to select [partners.](https://support.google.com/business/answer/7674102) The input is not needed for a vetted account. Token that is associated to the location. Token that is associated to the location. |\n\n### Response body\n\nResponse message for Verifications.VerifyLocation.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------|\n| ``` { \"verification\": { object (/my-business/reference/verifications/rest/v1/Verification) } } ``` |\n\n| Fields ||\n|----------------|--------------------------------------------------------------------------------------------------------------------------|\n| `verification` | `object (`[Verification](/my-business/reference/verifications/rest/v1/Verification)`)` The created verification request. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/business.manage`\n\nFor more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2).\n\nVerificationToken\n-----------------\n\nToken generated by a vetted [partner](https://support.google.com/business/answer/7674102).\n\n| JSON representation |\n|-----------------------------------|\n| ``` { \"tokenString\": string } ``` |\n\n| Fields ||\n|---------------|----------------------------|\n| `tokenString` | `string` The token string. |"]]