Google Business Messages (GBM) will be turned off on July 31, 2024. The Twilio GBM API and Google Business Profiles chat will no longer work after that point.
Google Business Messages ("GBM") lets users contact your business directly from Google Search, Google Maps and other entry points of your choosing. Using Twilio's APIs, you can engage with your users right where they are. GBM chats happen on Google's Messages app on Android, and through Google Maps on iOS.
GBM is available as a channel in Twilio Flex, Conversations API and Programmable Messaging API. Google does not charge any underlying fees. Pricing for each Twilio product applies - refer to each product's pricing page for more info.
Twilio supports inbound and outbound text and media (JPG, JPEG, PNG). Only 1 media file can be transmitted per message. Google Business Messages inbound message Context is available in the webhook field "ChannelMetadata". This includes any Google Maps place IDs, the entry point identifier, the user's display name, the device locale and the resolved locale.
The process to onboard onto Google Business Messages works as follows.
Please note that the estimated times provided above may vary depending on demand for GBM. Throughout the Verify and Launch steps, Twilio will be in touch with you via to guide you.
Twilio supports independent software vendors (ISV) and software integrators (SI) or signing up for GBM on behalf of their end clients. Please onboard only a single brand per Twilio Account Sid or Subaccount Sid.
Setting up a test sender for GBM is a self-serve process. In the Twilio Console, navigate to Channels > Google Business Messages and create a new brand and new sender. If you can't locate Channels, please use the "Explore Products" page.
Once you submit agree to the Google Terms of Service and submit the brand and sender names, Twilio will create a GBM sender for you. The sender status will be "Draft".
Immediately upon creating a GBM brand and sender, you will be redirected to the new sender's page. You can now test your sender! Access the "Sender Test Links" from your mobile device and you will be able to send your GBM sender a message.
Click to copy the links from the Console and access them from your phone. For example, you can send them to yourself in an email or WhatsApp message. From your phone, tap the link and send your agent a message.
To receive and respond to messages, you can use Conversations API, Programmable Messaging API or Twilio Flex.
Before you send your GBM sender a message, configure Twilio's Conversations API to create a new "conversation" each time a new user sends your business a message. Do this by creating an address configuration resource for your GBM sender and enabling the "auto-create" functionality. For example, using the CLI, run this command to automatically create a conversation when a new user sends a message to your GBM sender:
twilio api:conversations:v1:configuration:addresses:create --address gbm:{sender_ID} --type gbm --auto-creation.enabled
Learn more about GBM and Conversations API here.
Retrieve the GBM User ID from the Callback
When a user sends a message to your GBM sender, your callback URL will receive the message with the same parameters as a standard Twilio WhatsApp or SMS message. GBM senders and recipients have the format gbm:{sender_or_user_id}
. You will need to retrieve the GBM user ID from the callback response. You can also find this information in the Logs ("Monitor" tab in Console > Logs > Messaging).
Respond using the Programmable Messaging API
To respond with a GBM message, make an HTTP POST
request to Twilio's Programmable Messaging Message REST API resource. The "From" is your business' sender_ID
, found in the Sender page in Console. The recipient is the end user's GBM user_ID
from the callback. See the REST API: Sending a SMS or MMS or REST API: Messages page for details.
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function createMessage() {11const message = await client.messages.create({12body: "How can I help you?",13from: "gbm:{sender_id}",14to: "gbm:{user_id}",15});1617console.log(message.body);18}1920createMessage();
1{2"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"api_version": "2010-04-01",4"body": "How can I help you?",5"date_created": "Thu, 24 Aug 2023 05:01:45 +0000",6"date_sent": "Thu, 24 Aug 2023 05:01:45 +0000",7"date_updated": "Thu, 24 Aug 2023 05:01:45 +0000",8"direction": "outbound-api",9"error_code": null,10"error_message": null,11"from": "gbm:{sender_id}",12"num_media": "0",13"num_segments": "1",14"price": null,15"price_unit": null,16"messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",17"sid": "SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",18"status": "queued",19"subresource_uris": {20"media": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Media.json"21},22"tags": {23"campaign_name": "Spring Sale 2022",24"message_type": "cart_abandoned"25},26"to": "gbm:{user_id}",27"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"28}
Once you have tested and configured your workflows, you can start the launch process. To launch, Twilio will ask you to submit a form so you can complete these steps:
To proceed, go to the Twilio Console > Channels > Google Business Messages > click on the sender you want to launch. Scroll to the bottom and click the "Verify sender" button. You will receive an email with a ticket where Twilio will respond with next steps. Your sender status will become "Pending Verification".
Twilio will share a form with you via email. In this form, you will need to provide the information below.
Entry points are where the "chat" button shows up so users can start conversations with your sender. There are two types of entry points: Local, which is associated with Google Maps locations, and Non-local, which includes all other entry points such as Google Search, website and URL (refer to Google's documentation for more info).
You can provide as many entry points as you want in a single submission, but you must specify at least one entry point.
Domain entry points (Non-local): List any domains to enable the sitelinks entry point, i.e. "https://twilio.com". Once launched, Google Search will show your sender when users search for your domain(s). Domains must be unique to each verified sender.
Specify language and welcome messages for your bot. These can be edited later upon request.
After you submit the form (Step 3), Google will reach out via email to confirm the sender's info. Google reach out to the email contact from the brand that the sender represents. Google calls this "agent verification." The contact will receive two emails from Google and must respond:
Once the brand contact responds to Google via email, the agent will be verified and ready to launch its entry points.
Google monitors the quality of each sender by monitoring feedback from end users who interact with it. Twilio recommends setting up a chatbot to provide prompt responses and clear escalation paths to end users.
After your sender is verified, it will be ready to launch by enabling entry points.
Twilio will confirm with you prior to launching entry points. Once the launch process begins, the sender will be available to users within a few hours. You should be ready to respond to user messages before you launch a sender.
If you need to cancel a location launch or unlaunch a live location, you can ask Twilio to mark the location as unlaunched. If the location was in a pending launch state, this cancels the location launch. If the location was launched, this removes the location from all configured entry points.