Test devices  |  RCS Business Messaging Developer Docs  |  Google for Developers (2024)

Until youlaunch youragent, it can only communicate with designated test devices. This allows you totest your agent internally while preventing accidental early access toend-users.

To communicate with an RBM agent, a test device needs to be RCS-enabled. Notethat some Android devices don't have RCS enabled by default. You cancheck the RCS status of your device and, if necessary, enableRCS by configuring your device with pre-release versions of theMessages and Carrier Services apps.

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

An agent can send 20 tester requests each day with a maximum total of 200tester requests. If you add testers through the RBM API and you send morethan 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 testerrequest. If RCS is inactive on your device, you need toenable RCS on your device before you can begin testing your RBMagent 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 testerrequest.

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, andrequests to the device.

If the device isn't RCS-enabled, hasn't responded to the tester request, ordeclines the request, your agent receives a 403 PERMISSION_DENIEDerror 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 DeveloperConsole,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 youinvite 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, seephones.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 helperconst rbmApiHelper = require('@google/rcsbusinessmessaging');// Send the tester invite to the devicerbmApiHelper.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 helperfrom rcs_business_messaging import rbm_service# Send the tester invite to a devicerbm_service.invite_tester('+12223334444')
This code is an excerpt from an RBM sample agent.

C#

using RCSBusinessMessaging;…// Create an instance of the RBM API helperRbmApiHelper rbmApiHelper = new RbmApiHelper(credentialsFileLocation, projectId);// Register the device as a testerrbmApiHelper.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 foryour agent. You can sendmessages,events, andcapability checksto 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 fromyour unlaunched agent. The RBM platform doesn't delete messages sent by youragent that are in transit to or stored on the test device.

  1. Open the Business Communications DeveloperConsole,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 themore_vert menu for that list item.
  4. Click Remove device.
Test devices  |  RCS Business Messaging Developer Docs  |  Google for Developers (2024)
Top Articles
Latest Posts
Article information

Author: Gov. Deandrea McKenzie

Last Updated:

Views: 5767

Rating: 4.6 / 5 (66 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Gov. Deandrea McKenzie

Birthday: 2001-01-17

Address: Suite 769 2454 Marsha Coves, Debbieton, MS 95002

Phone: +813077629322

Job: Real-Estate Executive

Hobby: Archery, Metal detecting, Kitesurfing, Genealogy, Kitesurfing, Calligraphy, Roller skating

Introduction: My name is Gov. Deandrea McKenzie, I am a spotless, clean, glamorous, sparkling, adventurous, nice, brainy person who loves writing and wants to share my knowledge and understanding with you.