Connect RCS through your own Google RBM agent¶
This page shows you how to connect an agent to RCS through an RBM agent on your own Google partner account. Anychat sends and receives RCS messages through that agent, and you remain responsible for the partner account, the agent's verification and its carrier launch. For how channels and bindings work, see Channels.
If you don't have a partner account, choose Let Anychat set this up for you when connecting the channel.
Before you begin¶
You need an approved Google partner account and an RBM agent. Google's guide to building your first agent covers both. Collect these values:
| Field | Where to find it |
|---|---|
| RBM agent ID | The agent's Agent information page in the Developer Console. It ends in @rbm.goog. |
| Service-account key (JSON) | The JSON key file for your partner account's service account. Google issues one for the partner account, and it serves all of your agents. |
| Webhook client token | A value you choose. You set the same value on the agent's webhook in a later step. |
Connect the channel¶
- In the console, open your agent's Channels page and connect RCS.
- Choose Your own Google RBM agent.
- Enter the agent ID, paste the whole JSON key file, and enter your client
token. Anychat refuses a key it can't read and an agent ID that doesn't
end in
@rbm.goog. - Copy the webhook URL that the console shows. The URL belongs to this agent alone.
Set the agent's webhook¶
Set the webhook on the agent. A webhook set on the partner account sends every agent's traffic to one URL, and this URL keeps only this agent's messages.
- In the Developer Console, open the agent and click Integrations.
- In the Webhook section, click Configure.
- Paste the webhook URL.
- Enter the same client token that you gave Anychat.
- Click Verify. Google calls the URL, and the dialog closes when verification succeeds.
Google shares one delivery queue across a partner account
Google retries a failed delivery for up to seven days, and a webhook that keeps failing can delay events for your other agents. If the channel reports rejected webhooks, correct the client token promptly.
Add early-access numbers¶
An RBM agent that hasn't launched reaches only the test devices on its own list, and Anychat can't change that list on your account. Add each number in both places:
- In the Developer Console, as a test device on the agent. The phone's owner must accept Google's invitation.
- In Anychat, on the channel's early-access list.
Verify the channel¶
Run Test connection with a phone on both lists. It confirms that Google accepts your service account for this agent and that the phone is reachable, without sending a message or an invitation.
Then send a message to the agent from that phone. The message reaches your agent, and the reply arrives on the phone.
If nothing arrives, check the channel on the Channels page, which reports rejected webhooks and the setting to correct:
| The channel reports | What to do |
|---|---|
| Google signed the webhook with a different client token | Set the same client token on the channel and on the agent's webhook. |
| Google is sending messages for another agent | Move the webhook from your partner account onto this agent. |
Change credentials¶
To rotate the service-account key or the client token, edit the channel's credentials. A new key applies from the next send. Change a client token in the Developer Console at the same time, because Anychat rejects messages signed with the old token until both values match, and Google retries them after that.
Changing the agent ID also changes the webhook URL, so set the new URL on the agent.