RCS ディープリンクを生成する

このエンドポイントを使用して、Channel Manager API を通じて RCS ディープリンクを生成します。

各コード・スニペットで使用されているすべての変数の説明を以下に示します:

キー説明
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_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: GB for the United Kingdom

前提条件

申込書をお持ちでない場合は、ひとつ作るウェブフックの設定 もご確認ください。

コードを書く

generate-rcs-deeplink.sh に以下を追加する:

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}'"
  }'

全文を見る

コードを実行する

このファイルをあなたのマシンに保存し、実行する:

bash generate-rcs-deeplink.sh