Google Business Performance API มีเมธอด API
ใหม่ที่อนุญาตให้ดึง `DailyMetrics` หลายรายการในคําขอ API รายการเดียว
ตรวจสอบ
กําหนดการเลิกใช้งานและวิธีการย้ายข้อมูลจากเมธอด v4 reportInsights API ไปยัง API ประสิทธิภาพของ Google Business Profile
Method: locations.verify
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
เริ่มกระบวนการยืนยันสำหรับสถานที่
คำขอ HTTP
POST https://mybusinessverifications.googleapis.com/v1/{name=locations/*}:verify
URL ใช้ไวยากรณ์การแปลง 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 เท่านั้น สำหรับการยืนยัน ADDRESS เราจะใช้ที่อยู่เพื่อส่งไปรษณียบัตร สำหรับวิธีการอื่นๆ การยืนยันนี้ควรเหมือนกับวิธีการที่ส่งไปยัง GetConfirmOptions ระบบจะโยน INVALID_ARGUMENT ไปหากมีการตั้งค่าไว้สำหรับสถานที่ตั้งธุรกิจประเภทอื่น
|
ช่องการรวม RequestData ข้อมูลอินพุตของผู้ใช้สำหรับวิธีที่เฉพาะเจาะจงนอกเหนือจากข้อมูลการแสดงผล ข้อมูลต้องตรงกับวิธีการที่ขอ โปรดปล่อยว่างไว้หากไม่จำเป็นต้องใช้ข้อมูล RequestData ต้องเป็นค่าใดค่าหนึ่งต่อไปนี้ |
emailAddress |
string
ไม่บังคับ อินพุตสำหรับเมธอด EMAIL ที่อยู่อีเมลปลายทางสำหรับส่ง PIN เราจะยอมรับอีเมลก็ต่อเมื่อเป็นหนึ่งในที่อยู่ที่ locations.fetch VerificationOptions แจ้งไว้ หาก [Email VerificationData]
[google.mybusiness-verifications.v1.ConfirmOption.Email VerificationData] ตั้งค่า isUserNameEditable เป็น "จริง" ไคลเอ็นต์อาจระบุชื่ออื่น (local-part) แต่ต้องตรงกับชื่อโดเมน
|
mailerContact |
string
ไม่บังคับ อินพุตสำหรับเมธอด ADDRESS ชื่อผู้ติดต่อที่อีเมลควรส่งถึง
|
phoneNumber |
string
ไม่บังคับ อินพุตสำหรับวิธี PHONE_CALL/SMS หมายเลขโทรศัพท์ที่ควรโทรหาหรือส่ง 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
สตริงโทเค็น
|
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[[["\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. |"]]