Add Test devices to Agent
Use this endpoint to add test devices to Agent using the Channel Manager API. It adds test device to an existing RCS Agent.
Example
Find the description for all variables used in each code snippet below:
| Key | Description |
|---|---|
CHANNEL_MANAGER_RCS_AGENT_ID | The ID of the RCS agent. |
VONAGE_API_KEY | Your Vonage API key (see it on your dashboard). |
VONAGE_API_SECRET | Your Vonage API secret (also available on your dashboard). |
CHANNEL_MANAGER_RCS_AGENT_TEST_DEVICE_NUMBER | The phone number to add to the RCS Agent in E.164 format. |
Prerequisites
If you do not have an application you can create one. Make sure you also configure your webhooks.
Write the code
Add the following to add-test-devices-to-agent.sh:
curl -X POST https://api.nexmo.com/v1/channel-manager/rcs/agents/${CHANNEL_MANAGER_RCS_AGENT_ID}/test-devices \
-u "${VONAGE_API_KEY}:${VONAGE_API_SECRET}" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d $'{
"phone": "'${CHANNEL_MANAGER_RCS_AGENT_TEST_DEVICE_NUMBER}'"
}'Run your code
Save this file to your machine and run it:
bash add-test-devices-to-agent.sh