Gerar link direto do RCS
Use este endpoint para gerar um deeplink RCS por meio da API do Channel Manager.
Exemplo
Veja a seguir a descrição de todas as variáveis utilizadas em cada trecho de código:
| Chave | Descrição |
|---|---|
VONAGE_API_KEY | Your Vonage API key (see it on |
VONAGE_API_SECRET | Your Vonage API secret (also available on |
CHANNEL_MANAGER_RCS_AGENT_SENDER_ID | A unique sender identifier for the RCS Agent on the Vonage platform. |
COUNTRY_CODE | The two digit country code for the number. For example: |
Pré-requisitos
Se você não tiver um aplicativo, acesse criar um. Certifique-se também de acessar configure seus webhooks.
Escreva o código
Adicione o seguinte ao arquivo ` generate-rcs-deeplink.sh`:
Copiar
curl -X POST https://api.nexmo.com/v1/channel-manager/rcs/deeplink/generate \
-u "${VONAGE_API_KEY}:${VONAGE_API_SECRET}" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d $'{
"sender_id": "'${CHANNEL_MANAGER_RCS_AGENT_SENDER_ID}'",
"country": "'${COUNTRY_CODE}'"
}'Execute seu código
Salve este arquivo no seu computador e execute-o:
bash generate-rcs-deeplink.sh