Google Business Performance API มีเมธอด API
ใหม่ที่อนุญาตให้ดึง `DailyMetrics` หลายรายการในคําขอ API รายการเดียว
ตรวจสอบ
กําหนดการเลิกใช้งานและวิธีการย้ายข้อมูลจากเมธอด v4 reportInsights API ไปยัง API ประสิทธิภาพของ Google Business Profile
Method: accounts.create
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
สร้างบัญชีที่มีชื่อและประเภทที่ระบุภายใต้ระดับบนสุดที่กำหนด
- ทั้งนี้คุณจะสร้างบัญชีส่วนตัวและองค์กรไม่ได้
- สร้างกลุ่มผู้ใช้ด้วยบัญชีส่วนบุคคลเป็นเจ้าของหลักไม่ได้
- คุณไม่สามารถสร้างกลุ่มสถานที่ตั้งโดยมีเจ้าของหลักของบัญชีส่วนบุคคลได้ หากบัญชีส่วนบุคคลอยู่ในองค์กร
- กลุ่มสถานที่ตั้งไม่สามารถเป็นเจ้าของกลุ่มสถานที่ตั้ง
คำขอ HTTP
POST https://mybusiness.googleapis.com/v4/accounts
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์การค้นหา
พารามิเตอร์ |
primaryOwner |
string
ชื่อทรัพยากรของบัญชีที่จะเป็นเจ้าของหลักของบัญชีที่สร้างขึ้น ซึ่งควรอยู่ในรูปแบบ accounts/{accountId}/
|
เนื้อหาของคำขอ
เนื้อความของคำขอมีอินสแตนซ์ของ Account
เนื้อหาการตอบกลับ
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีอินสแตนซ์ Account
ที่สร้างขึ้นใหม่
ขอบเขตการให้สิทธิ์
ต้องมีขอบเขต OAuth อย่างใดอย่างหนึ่งต่อไปนี้
https://www.googleapis.com/auth/plus.business.manage
https://www.googleapis.com/auth/business.manage
ดูข้อมูลเพิ่มเติมได้ที่ภาพรวมของ OAuth 2.0
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[[["\u003cp\u003eThis endpoint creates a new Google My Business account with a specified name, type, and primary owner, but Personal accounts and Organizations cannot be created directly.\u003c/p\u003e\n"],["\u003cp\u003eLocation Groups have ownership restrictions, preventing creation by Personal accounts under certain conditions or ownership of other Location Groups.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires specifying the primary owner's account ID and the account details in the request body, using the \u003ccode\u003ePOST\u003c/code\u003e method with the provided URL.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful requests return the newly created account details, while authorization requires specific OAuth scopes for account management.\u003c/p\u003e\n"],["\u003cp\u003eThis endpoint is deprecated and Google recommends using the Account Management API instead for creating accounts.\u003c/p\u003e\n"]]],[],null,["# Method: accounts.create\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization Scopes](#body.aspect)\n\n| Deprecated. Please use the [Account Management API](https://developers.google.com/my-business/reference/accountmanagement/rest/v1/accounts/create) instead.\nCreates an account with the specified name and type under the given parent.\n\n- Personal accounts and Organizations cannot be created.\n- User Groups cannot be created with a Personal account as primary owner.\n- Location Groups cannot be created with a primary owner of a Personal account if the Personal account is in an Organization.\n- Location Groups cannot own Location Groups.\n\n\u003cbr /\u003e\n\n### HTTP request\n\n`POST https://mybusiness.googleapis.com/v4/accounts`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Query parameters\n\n| Parameters ||\n|----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `primaryOwner` | `string` The resource name of the account which will be the primary owner of the account being created. It should be of the form `accounts/{accountId}/`. |\n\n### Request body\n\nThe request body contains an instance of [Account](/my-business/reference/rest/v4/accounts#Account).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [Account](/my-business/reference/rest/v4/accounts#Account).\n\n### Authorization Scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/plus.business.manage`\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)."]]