Until you launch your agent, it can only communicate with designated test devices. This lets you test your agent internally to prevent accidental early access to end-users.
To communicate with an RBM agent, a test device needs to be RCS-enabled. Note that some Android devices don't have RCS enabled by default. To check your device's RCS status, see Check the RCS status of your device.
Agents can send a maximum of 20 tester invites per day, with a total limit of 200 invites.
Check the RCS status of your device
- In the Messages app, navigate to Messages settings.
- Tap RCS chats. If you can't find "RCS chats", tap Chat features.
- Find the Status value.
If your device isn't RCS-enabled, enable RCS by configuring your device with pre-release versions of the Messages and Carrier Services apps.
If your device is RCS-enabled, you can send a tester invite. When the device accepts the invite, it can start messaging with your unlaunched agent.
Enable RCS on your device
To enable RCS on an Android device, turn on RCS chats in the Messages app.
When RCS is active on your device, you're ready to send a tester invite.
Send a tester invite
To invite an RCS-enabled device to become a tester, you send a tester invite. When the device accepts the invite, your agent can send messages, events, and requests to the device.
If the device isn't RCS-enabled, hasn't responded to the tester invite, or
declines the invite, your agent will receive a 403 PERMISSION_DENIED
error
when it attempts to communicate with the device.
Console
To send a tester invite with the Business Communications Developer Console:
- Open the Business Communications Developer Console, sign in with your RBM Google Account, and click your agent.
- On the left menu, select Devices.
- Add a test device to the Test devices list by entering the device's phone number, including the country code and the area code. To add multiple phone numbers, separate them with commas.
When a device is added to the list, an invitation is sent. The user sees the invitation message on their device and has the option to either accept or decline it.
The Test devices list details the tester invite status for each device that you invite to test your agent.
API
To send a tester invite with the RBM Management API:
Use the following code. For formatting and value options, see
testers
.
cURL
curl -X POST "https://businesscommunications.googleapis.com/v1/testers" \ -H "Content-Type: application/json" \ -H "User-Agent: curl/rcs-business-messaging" \ -H "`oauth2l header --json PATH_TO_SERVICE_ACCOUNT_KEY rcsbusinessmessaging`" \ -d '{"phone_number": "PHONE_NUMBER", "agentId": "AGENT_ID"}'
Node.js
// Reference to RBM API helper const rbmApiHelper = require('@google/rcsbusinessmessaging'); // Send the tester invite to the device rbmApiHelper.sendTesterInvite('+12223334444', function(response) { console.log(response); });
Java
import com.google.rbm.RbmApiHelper; … try { // Create an instance of the RBM API helper RbmApiHelper rbmApiHelper = new RbmApiHelper(); // Register the device as a tester rbmApiHelper.registerTester("+12223334444"); } catch(Exception e) { e.printStackTrace(); }
Python
# Reference to RBM Python client helper from rcs_business_messaging import rbm_service # Send the tester invite to a device rbm_service.invite_tester('+12223334444')
C#
using RCSBusinessMessaging; … // Create an instance of the RBM API helper RbmApiHelper rbmApiHelper = new RbmApiHelper(credentialsFileLocation, projectId); // Register the device as a tester rbmApiHelper.RegisterTester("+12223334444");
If you send more than 200 invites, the RBM platform returns the
429 RESOURCE_EXHAUSTED
error code in response.
Resend tester invites
If needed, you can resend a tester invite. The result depends on the device's current invite status.
Device status | Result |
PENDING
|
Tester invite is sent to the device. |
ACCEPTED
|
Tester invite is not sent to the device, which maintains its ACCEPTED status.
|
DECLINED
|
Tester invite is declined. You must remove the test device first, before resending an invite. Otherwise, the request fails. |
After the device accepts the tester invite, it becomes a designated test device for your agent. You can send messages, events, and capability checks to the device to test your agent's functionality and workflows.
Get the invite status of a test device
When you invite a tester, they can either accept or decline the invite on their device. You can query the API for the device's invite status.
Console
To get the invite status of a test device with the Business Communications Developer Console:
- Open the Business Communications Developer Console, sign in with your RBM Google Account, and click your agent.
- On the left menu, select Devices.
- Add a test device to the Test devices list by entering the device's phone number, including the country code and the area code. To add multiple phone numbers, separate them with commas.
When a test device is added to the list, you can check its status in the Status column.
API
To get the invite status of a test device with the RBM Management API:
Use the following code. For formatting and value options, see
testers
.
cURL
curl -X GET "https://businesscommunications.googleapis.com/v1/testers/PHONE_NUMBER?agentId=AGENT_ID" \ -H "Content-Type: application/json" \ -H "User-Agent: curl/rcs-business-messaging" \ -H "`oauth2l header --json PATH_TO_SERVICE_ACCOUNT_KEY rcsbusinessmessaging`"
Get the status of all test devices
You can query the invite status of all the devices that you invited to be testers.
Console
To check the invite status of all test devices with the Business Communications Developer Console:
- Open the Business Communications Developer Console, sign in with your RBM Google Account, and click your agent.
- On the left menu, select Devices.
- Add a test device to the Test devices list by entering the device's phone number, including the country code and the area code. To add multiple phone numbers, separate them with commas.
When a test device is added to the list, you can check its status in the Status column.
API
To check the invite status of all test devices with the RBM Management API:
Use the following code. For formatting and value options, see
testers
.
cURL
curl -X GET "https://businesscommunications.googleapis.com/v1/testers?agentId=AGENT_ID" \ -H "Content-Type: application/json" \ -H "User-Agent: curl/rcs-business-messaging" \ -H "`oauth2l header --json PATH_TO_SERVICE_ACCOUNT_KEY rcsbusinessmessaging`"
Remove a test device
When you remove a test device, the device can no longer receive messages from your unlaunched agent. The RBM platform doesn't delete messages sent by your agent that are in transit to or stored on the test device.
Console
To remove a test device with the Business Communications Developer Console:
- Open the Business Communications Developer Console, sign in with your RBM Google Account, and click your agent.
- On the left menu, select Devices.
- Select the device in Test devices list and click the menu.
- Click Remove device.
API
To remove a test device with the RBM Management API:
Use the following code. For formatting and value options, see
testers
.
cURL
curl -X DELETE "https://businesscommunications.googleapis.com/v1/testers/PHONE_NUMBER?agentId=AGENT_ID" \ -H "Content-Type: application/json" \ -H "User-Agent: curl/rcs-business-messaging" \ -H "`oauth2l header --json PATH_TO_SERVICE_ACCOUNT_KEY rcsbusinessmessaging`"