Añadir transportistas al agente
Utilice este endpoint para añadir Transportistas al Agente utilizando la API de Channel Manager. Añade transportistas a un Agente RCS existente.
Ejemplo
A continuación encontrará la descripción de todas las variables utilizadas en cada fragmento de código:
| Clave | Descripción |
|---|---|
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_CARRIER_ID | The ID of the carrier to be added. |
Requisitos previos
Si no tiene una solicitud, puede crear uno. Asegúrese también de configure sus webhooks.
Escriba el código
Añada lo siguiente a add-carriers-to-agent.sh:
curl -X POST https://api.nexmo.com/v1/channel-manager/rcs/agents/${CHANNEL_MANAGER_RCS_AGENT_ID}/carriers \
-u "${VONAGE_API_KEY}:${VONAGE_API_SECRET}" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d $'{
"carriers": [
"'${CHANNEL_MANAGER_RCS_AGENT_CARRIER_ID}'"
]
}'Ejecute su código
Guarde este archivo en su máquina y ejecútelo:
bash add-carriers-to-agent.sh