[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eRegister as a Business Messages partner to enable conversations between users and brands through agents, representing specific business functions.\u003c/p\u003e\n"],["\u003cp\u003eCreate and configure agents to receive and respond to user messages initiated from Google Search or Maps via the "Chat" option.\u003c/p\u003e\n"],["\u003cp\u003eSecurely authenticate API calls using a service account key and the oauth2l command-line tool to manage agents and send messages.\u003c/p\u003e\n"],["\u003cp\u003eSet up a webhook to receive messages from users and verify its configuration using a clientToken and secret provided by Google.\u003c/p\u003e\n"],["\u003cp\u003eAccess and manage partner information, including updating details and webhook URLs, through the Business Communications Developer Console or API calls.\u003c/p\u003e\n"]]],[],null,["# Register with Business Messages\n\nWhen you register as a partner with Business Messages, you can enable\nconversations between users and brands by creating agents---conversational\nentities that represent business functions, such as website support, and brand\nlocations.\n| **Agent**: A conversational representation of a brand, managed by a partner. Includes any interface users interact with and any code or infrastructure required to power the interaction.\n\nWhen a user finds a brand that you manage in Google Search or Google Maps, the\nsearch results display a **Chat** option. When the user clicks **Chat**, they\ncan send messages to the brand's agent. The agent lets you receive and respond\nto the user's messages.\n\nRegister as a partner\n---------------------\n\nBy registering as a partner with Business Messages, creating agents for brands,\nand leveraging the APIs that power your agent, you can enable messaging\nexperiences for customer services, sales, and other business applications.\n\n1. Open the [Business Communications Developer Console](https://business-communications.cloud.google.com?utm_source=/business-communications/business-messages/guides/how-to/register&utm_medium=devsite&utm_campaign=business-messages).\n2. Under **Business Messages** , click **Create partner account**.\n3. Enter values for your partner information:\n\n | Field | Value |\n |-----------------|-----------------------------------------------------------|\n | Your name | Your full name |\n | Partner name | Your organization's name |\n | Partner website | Your organization's website |\n | Region | The region you want to host the Business Messages service |\n\n| **Note:** To launch a production agent with Business Messages, you must register with a corporate email, not a personal email.\n\n1. Review and accept the\n [Business Messages Terms of Service](/business-communications/business-messages/support/tos).\n\n2. Click **Create**.\n\nYou are now registered as a Business Messages partner and have access to the Business Messages and Business Communications APIs. The Business Messages API sends messages to users, while the Business Communications API manages agents.\n\nCreate a service account\n------------------------\n\nTo securely authenticate API calls to the Business Messages and Business Communications APIs, you need a service account key and the\n[oauth2l](https://github.com/google/oauth2l) command line tool.\n\n1. On the [Business Communications Developer Console](https://business-communications.cloud.google.com?utm_source=/business-communications/business-messages/guides/how-to/register&utm_medium=devsite&utm_campaign=business-messages) home page, click **Partner account settings**.\n2. In the left navigation, click **Service account**.\n3. Click **Create key** , then click **Create**.\n\n Your browser downloads the service account key. Store your service account key in a secure, private location. Don't\n share your key publicly. You will need this key later to access the Business Message and Business Communication APIs.\n\n| **Note:** If you are a a Business Messages partner with your own GCP account, you can access your service account keys in the Google Cloud Console.\n\nSet your webook\n---------------\n\nNow that the Business Messages and Business Communications API is enabled, you\nmust specify your webhook URL to start\n[receiving messages](/business-communications/business-messages/guides/how-to/message/receive).\n\n1. Open the [Account settings](https://business-communications.cloud.google.com/console/partner/settings?utm_source=/business-communications/business-messages/guides/how-to/register&utm_medium=devsite&utm_campaign=business-messages) in Business Communications Developer Console.\n2. Make sure the correct partner account is selected.\n3. For **Business Messages webhook URL** , click **Configure**.\n4. For **Webhook endpoint URL**, enter your webhook's URL, beginning with \"https://\".\n5. Note your `clientToken` value. You need it to [verify that messages you\n receive are coming from\n Google](/business-communications/business-messages/guides/how-to/message/receive#verify).\n6. Configure your webhook to accept a `POST` request with the specified\n `clientToken` parameter and send a `200 OK` response with the plain text\n value of the `secret` parameter as the response body.\n\n For example, if your webhook receives a `POST` request with the following\n body content \n\n {\n \"clientToken\":\"SJENCPGJESMGUFPY\",\n \"secret\":\"0123456789\"\n }\n\n your webhook should confirm the `clientToken` value and, if `clientToken` is\n correct, return a `200 OK` response with `0123456789` as the response body.\n7. In the console, click **Verify**.\n\n When Business Messages verifies your webhook, the dialog closes.\n\nSee\n[Example: Update webhook URL](/business-communications/business-messages/guides/how-to/register#example_update_webhook_url)\nto see how to configure your webhook with the Business Communication APIs.\n\nGet partner information\n-----------------------\n\nTo get your current partner information, you can query the Business\nCommunications API with your Partner ID.\n\nRun the following command. Replace \u003cvar translate=\"no\"\u003ePARTNER_ID\u003c/var\u003e with your Partner ID. \n\n```scdoc\n# This code gets the partner.\n# Read more: https://developers.google.com/business-communications/business-messages/reference/business-communications/rest/v1/partners/get\n\n# Replace the __PARTNER_ID__\n# Make sure a service account key file exists at ./service_account_key.json\n\ncurl -X GET \\\n\"https://businesscommunications.googleapis.com/v1/partners/__PARTNER_ID__\" \\\n-H \"Content-Type: application/json\" \\\n-H \"User-Agent: curl/business-communications\" \\\n-H \"$(oauth2l header --json ./service_account_key.json businesscommunications)\"https://github.com/google-business-communications/bc-snippets-curl/blob/a178f03afcafe6510edd240c7097c692d4e9b56a/get-partner.sh\n```\n\nUpdate partner information\n--------------------------\n\nTo update your partner information, you can use the [Account settings](https://business-communications.cloud.google.com/console/partner/settings?utm_source=/business-communications/business-messages/guides/how-to/register&utm_medium=devsite&utm_campaign=business-messages) page in Business Communications Developer Console or run the following commands.\n\nReplace\n\u003cvar translate=\"no\"\u003ePARTNER_ID\u003c/var\u003e with your Partner ID(Partner ID can be found in Business Communications Developer Console), and replace\n\u003cvar translate=\"no\"\u003eUPDATED_FIELDS\u003c/var\u003e with the field names you update. \n\n```scdoc\n# This code updates the partner entity.\n# Read more: https://developers.google.com/business-communications/business-messages/reference/business-communications/rest/v1/partners/patch\n\n# Replace the __PARTNER_ID__, __UPDATED_FIELDS__, __FIELD_NAME__, __FIELD_VALUE__\n# Make sure a service account key file exists at ./service_account_key.json\n\ncurl -X PATCH \\\n\"https://businesscommunications.googleapis.com/v1/partners/__PARTNER_ID__?updateMask=__UPDATED_FIELDS__\" \\\n-H \"Content-Type: application/json\" \\\n-H \"User-Agent: curl/business-communications\" \\\n-H \"$(oauth2l header --json ./service_account_key.json businesscommunications)\" \\\n-d '{\n \"__FIELD_NAME__\": \"__FIELD_VALUE__\"\n}'https://github.com/google-business-communications/bc-snippets-curl/blob/a178f03afcafe6510edd240c7097c692d4e9b56a/update-partner.sh\n```\n\nFor formatting and value options, see\n[`partners.patch`](/business-communications/business-messages/reference/business-communications/rest/v1/partners/patch).\n\n### Example: Update display name\n\n```text\ncurl -X PATCH \\\n\"https://businesscommunications.googleapis.com/v1/brands/12345/partners/67890?updateMask=displayName\" \\\n-H \"Content-Type: application/json\" \\\n-H \"User-Agent: curl/business-communications\" \\\n-H \"$(oauth2l header --json /path/to/service/account/key businesscommunications)\" \\\n-d \"{\n 'displayName': 'XYZ Messaging',\n}\"\n```\n\n### Example: Update webhook URL\n\n```scdoc\ncurl -X PATCH \\\n\"https://businesscommunications.googleapis.com/v1/partners/12345?updateMask=productCapabilities\" \\\n-H \"Content-Type: application/json\" \\\n-H \"User-Agent: curl/business-communications\" \\\n-H \"$(oauth2l header --json /path/to/service/account/key businesscommunications)\" \\\n-d \"{\n 'productCapabilities': [\n {\n 'product': 'BUSINESS_MESSAGES',\n 'businessMessagesCapability': {\n 'webhookUrl': 'https://xyz.messaging.com/webhook',\n },\n },\n ],\n}\"\n```\n\nNext steps\n----------\n\nNow that you're a registered partner and have enabled the APIs, you can start\ndeveloping with Business Messages. To get started quickly, see\n[Create your first agent](/business-communications/business-messages/guides/quickstarts/echo-agent).\n\nOtherwise, learn how to\n[create agents](/business-communications/business-messages/guides/how-to/agents)\nto represent your brands in conversations and configure your webhook to\n[receive messages](/business-communications/business-messages/guides/how-to/message/receive)\nfrom users."]]