Test devices

Until you launch your agent, it can only communicate with designated test devices. This allows you to test your agent internally while preventing 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. You can check the RCS status of your device and, if necessary, enable RCS by configuring your device with pre-release versions of the Messages and Carrier Services apps.

When your device is RCS-enabled, you can send a tester request to invite the device to test your agent. Once the device accepts the request, it can receive and respond to messages from your unlauched agent.

An agent can send 20 tester requests each day with a maximum total of 200 tester requests. If you add testers through the RBM API and you send more than 200 requests, the RBM platform returns a 429 RESOURCE_EXHAUSTED response.

Check the RCS status of your device

  1. In the Messages app, navigate to Messages settings.
  2. Tap RCS chats. If you can't find "RCS chats", tap Chat features.
  3. Find the Status value.

    If Status is Connected, RCS is active on your device.

Next steps

If RCS is active on your device, you're ready to send a tester request. If RCS is inactive on your device, you need to enable RCS on your device before you can begin testing your RBM agent with it.

Enable RCS on your device

To enable RCS on an Android device, turn on RCS chats in the Messages app.

Next steps

Once RCS is active on your device, you're ready to send a tester request.

Send a tester request

To invite an RCS-enabled device to become a tester, you send a tester request. If the device accepts the request, your agent can send messages, events, and requests to the device.

If the device isn't RCS-enabled, hasn't responded to the tester request, or declines the request, your agent receives a 403 PERMISSION_DENIED error when it attempts to communicate with the device.

Option 1: Send a tester request with the Business Communications Developer Console

  1. Open the Business Communications Developer Console, sign in with your RBM Google account, and click your agent.
  2. In the left navigation, click Devices.
  3. For Add test devices, enter your device's phone number and click Add.

Test devices list details the tester request status for each device that you invite to test your agent.

Option 2: Send a tester request with the RBM API

The following code sends a tester request. For formatting and value options, see phones.testers.

cURL

curl -X POST "https://REGION-rcsbusinessmessaging.googleapis.com/v1/phones/PHONE_NUMBER/testers" \
-H "Content-Type: application/json" \
-H "User-Agent: curl/rcs-business-messaging" \
-H "`oauth2l header --json PATH_TO_SERVICE_ACCOUNT_KEY rcsbusinessmessaging`"

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);
});
This code is an excerpt from an RBM sample agent.

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();
}
This code is an excerpt from an RBM sample agent.

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')
This code is an excerpt from an RBM sample agent.

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");
This code is an excerpt from an RBM sample agent.

Next steps

After the device accepts the tester request, it's a designated test device for your agent. You can send messages, events, and capability checks to your device to test your agent's functionality and workflows.

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.

  1. Open the Business Communications Developer Console, sign in with your RBM Google account, and click your agent.
  2. In the left navigation, click Devices.
  3. Locate the device in Test device list and click the menu for that list item.
  4. Click Remove device.