View a markdown version of this page

RCS 入門 - AWS 最終使用者傳訊簡訊

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

RCS 入門

本指南會逐步引導您在 AWS 最終使用者傳訊中設定第一個 RCS 代理程式,以及傳送和接收您的第一個 RCS 訊息。最後,您將擁有運作中的 RCS 測試環境。預估完成時間:15-30 分鐘。

以下是本指南涵蓋的內容:

  1. 建立 AWS RCS 代理程式並提交測試註冊

  2. 新增測試裝置並接受測試人員邀請

  3. 傳送您的第一個傳出 RCS 訊息

  4. 使用關鍵字測試傳入 (雙向) 訊息

如需 RCS 在 AWS 最終使用者傳訊中運作方式的背景,包括雙層身分模型 (AWS RCS Agent 和 RCS for Business IDs),請參閱 什麼是 RCS?

設定和測試 RCS

本節會引導您建立 AWS RCS 代理程式、註冊測試裝置、傳送您的第一個 RCS 訊息,以及驗證交付。完成這些步驟後,您可以繼續在生產國家/地區啟動 RCS。

先決條件

開始前,請確定您具有下列項目:

  • 具有 AWS 最終使用者傳訊存取權 AWS 的帳戶 — 您需要具有使用 AWS 最終使用者傳訊許可 AWS 的帳戶。如果您沒有 帳戶,請參閱AWS 帳戶設定指南

  • 啟用 RCS 的手機 — 您需要在預設傳訊應用程式中啟用 RCS 訊息的 Android 手機,或執行 iOS 18 或更新版本的 iPhone。此電話可做為接收 RCS 訊息的測試裝置。

  • (選用)設定的 AWS CLI — 如果您想要使用 API 而非主控台進行測試,請安裝和設定 AWS CLI 或使用 AWS SDK,例如 boto3 for Python。

步驟 1:建立 AWS RCS 代理程式並提交測試註冊

第一步是建立 AWS RCS 代理程式並提交測試註冊。測試註冊會建立 RCS for Business ID (測試代理程式),您可用來傳送訊息至已註冊的測試裝置,而無需電信業者核准。

如需 AWS RCS 代理程式管理的完整詳細資訊,包括代理程式生命週期和 API 操作,請參閱 管理 RCS 代理程式

建立 AWS RCS 代理程式 (主控台)

建立 AWS RCS 代理程式並提交測試註冊
  1. 開啟AWS 最終使用者傳訊主控台

  2. 在導覽窗格中的組態下,選擇 RCS 代理程式

  3. 選擇建立 RCS 代理程式。這會建立 AWS RCS 代理程式,然後立即引導您在單一工作流程中建立測試註冊。

  4. 下一個畫面顯示 RCS 簡介,並說明設定程序。檢閱資訊,然後選擇下一步以繼續。

  5. 客服人員詳細資訊頁面上,設定下列項目:

    • 易記名稱 — AWS RCS 代理程式的主控台專用標籤。這是供您參考的內部名稱 (存放為標籤),不是收件人手機上顯示的名稱。易記名稱無法透過 API 使用。

    • 刪除保護 — (選用) 啟用 以防止意外刪除代理程式。

    • 標籤 — (選用) 新增標籤以組織和識別您的代理程式。

  6. 在相同頁面的品牌資訊區段中,輸入下列內容:

    • 顯示名稱 — 收件人在您的 RCS 訊息旁邊看到的品牌名稱。

    • 描述 — 您的品牌或業務的簡短描述。

    • 使用案例 — 選取 RCS 訊息的主要使用案例 (例如交易通知、行銷或客戶支援)。

  7. 在相同頁面的品牌資產區段中,上傳下列項目:

    • 標誌 — 224 × 224 像素,具有透明度的 PNG,小於 50 KB。

    • 橫幅影像 — 1440 × 448 像素,PNG 或 JPEG,小於 200 KB。

    • 品牌顏色 — 十六進位顏色代碼 (例如 #1A73E8),與白色背景的最小對比度為 4.5:1。

    重要

    提交代理程式進行註冊後,就無法變更某些品牌資產。在建立代理程式之前準備您的最終品牌資產。如果您想要先實驗,您可以使用此流程快速建立測試代理程式,然後建立全新的 AWS RCS 代理程式,並在稍後完成品牌資產。

  8. 合規關鍵字頁面上,設定您的關鍵字和自動回應訊息。

  9. 檢閱頁面上,驗證您的所有設定。

  10. 選擇驗證並提交以建立 AWS RCS 代理程式並提交測試註冊。

注意

您已成功建立 AWS RCS 代理程式並提交測試註冊。您的測試代理程式通常會在幾分鐘內獲得核准。現在,讓我們啟用測試傳訊至您的裝置。

建立 AWS RCS 代理程式 (CLI)

您也可以使用 CLI 建立 AWS RCS AWS 代理程式。首先,建立代理程式,然後提交測試註冊。

步驟 1:建立 AWS RCS 代理程式:

aws pinpoint-sms-voice-v2 create-rcs-agent \ --deletion-protection-enabled

步驟 2:提交客服人員的測試註冊。使用 CreateRegistration API 搭配 RCS 測試的註冊類型。您可以使用 DescribeRegistrationFieldDefinitions API 在提交之前,以程式設計方式擷取所有可用的註冊表單欄位。在註冊表單欄位中提供您的品牌資產、描述和聯絡詳細資訊。

如需註冊 API 的詳細資訊,請參閱 管理 RCS 代理程式

步驟 2:新增測試裝置

測試註冊獲得核准後,請將您的手機新增為測試裝置,以便您可以從測試代理程式接收 RCS 訊息。

注意

新增測試裝置後,不會立即傳送測試人員邀請。系統會延遲啟用至少 120 秒,最多可能需要 20 分鐘才能收到邀請。主控台會顯示大約的啟用時間。新增裝置之前,您不需要等待 — 系統會自動處理延遲。

Console
新增測試裝置
  1. 在 AWS 最終使用者傳訊主控台中,導覽至您的 AWS RCS 代理程式,然後選擇測試索引標籤。

  2. 選擇新增測試裝置

  3. 以 E.164 格式輸入測試裝置的電話號碼 (例如 +12065550100)。

  4. 選擇新增

AWS CLI

使用 CreateVerifiedDestinationNumber API 搭配 --rcs-agent-id 參數,為您的 AWS RCS 代理程式註冊測試裝置:

aws pinpoint-sms-voice-v2 create-verified-destination-number \ --destination-phone-number +12065550100 \ --rcs-agent-id rcs-a1b2c3d4

新增測試裝置後, AWS 最終使用者傳訊會將測試人員邀請傳送至電話號碼。邀請來自稱為 RBM Tester Management 的 RCS 代理程式,並包含兩個按鈕來接受或拒絕:讓我成為測試人員拒絕。收件人必須點選設為測試人員以完成驗證。

注意

在 iOS 裝置 (使用 iOS 18 或更新版本的 iPhone) 上,測試人員邀請可能會出現在訊息應用程式的未知寄件者資料夾中,而不是主要收件匣中。如果您沒有看到邀請,請檢查未知寄件者資料夾。

如需管理測試裝置的詳細資訊,包括 API 方法和故障診斷,請參閱 測試 RCS 訊息

步驟 3:傳送您的第一個 RCS 訊息

測試裝置接受測試人員邀請後,您可以傳送第一個 RCS 訊息。您可以使用 AWS 最終使用者傳訊主控台或 API。

Console
使用主控台傳送測試訊息
  1. 在 AWS 最終使用者傳訊主控台中,導覽至您的 AWS RCS 代理程式,然後選擇測試索引標籤。

  2. 選擇傳出測試訊息。主控台會顯示您的訊息如何在收件人的裝置上呈現的預覽,以及 JSON 請求內文和 CLI 命令。

  3. 從清單中選擇已驗證的測試裝置。

  4. 輸入您的訊息文字。

  5. 選擇傳送測試訊息

注意

您可以選擇性地設定訊息事件的組態設定。組態設定可讓您在您選擇的事件目的地中使用精細交付收據 (DLRs) 和其他訊息事件。這是測試選用項目,但建議用於生產用途。如需詳細資訊,請參閱RCS CloudWatch 指標和監控

AWS CLI

使用 send-text-message命令傳送測試訊息。將您的 AWS RCS 代理程式 ARN 指定為起始身分:

aws pinpoint-sms-voice-v2 send-text-message \ --destination-phone-number +12065550100 \ --origination-identity arn:aws:sms-voice:us-east-1:123456789012:rcs-agent/rcs-a1b2c3d4 \ --message-body "Hello from RCS! This is my first test message."

send-text-message 命令與您用於 SMS 的命令相同。當您將 AWS RCS 代理程式 ARN 指定為起始身分時, AWS 最終使用者傳訊會透過 RCS 傳遞訊息。

步驟 4:測試傳入 (雙向) 訊息

您可以使用自動回應設定關鍵字,然後從符合該關鍵字的測試裝置傳送訊息,以測試傳入 RCS 訊息。

使用自動回應關鍵字測試傳入訊息
  1. 在 AWS 最終使用者傳訊主控台中,導覽至您的 AWS RCS 代理程式並設定關鍵字。例如,設定RCSINBOUNDTESTING具有自動回應訊息的關鍵字,例如「傳入測試成功!已收到您的訊息。」

  2. 測試索引標籤上,選擇傳入深度連結

  3. 預設訊息內文欄位中,輸入您設定的關鍵字 (例如 RCSINBOUNDTESTING)。

  4. 選擇產生連結。主控台會使用 GSMA 標準 sms: URI 機制產生傳入深層連結 URL。此深層連結內嵌在畫面上顯示的 QR 碼中。

  5. 使用已驗證的測試器電話掃描 QR 碼。這會開啟原生傳訊應用程式,其中包含傳送至 AWS RCS 代理程式的預先填入訊息。

  6. 從測試裝置傳送訊息。

  7. 確認您在測試裝置上收到自動回應訊息。

測試自動回應關鍵字不需要設定事件目的地或 Amazon SNS 主題。自動回應完全由 AWS 最終使用者傳訊根據 AWS RCS 代理程式上的關鍵字組態處理。

若要接收和處理任意傳入訊息 (不只是關鍵字比對),您需要為雙向傳訊設定 Amazon SNS 主題。如需詳細資訊,請參閱接收傳入 RCS 訊息

您完成的事項

透過完成本指南中的步驟,您可以:

  • 使用品牌資產建立 AWS RCS 代理程式並提交測試註冊

  • 已註冊測試裝置並接受測試人員邀請

  • 傳送您的第一個 RCS 訊息和已驗證的交付

  • 使用自動回應關鍵字測試傳入訊息

您的測試環境現已準備就緒。以下是將 RCS 訊息整合到您的應用程式或微調 RCS 訊息運作方式的方法:

  • 接收和處理傳入訊息:設定 Amazon SNS 主題以接收傳入 RCS 訊息,並使用 Lambda 函數處理這些訊息。請參閱 接收傳入 RCS 訊息

  • 追蹤交付事件:設定組態設定,以在您選擇的事件目的地中使用精細交付收據 (DLRs) 和其他訊息事件。請參閱 RCS CloudWatch 指標和監控

  • 啟用 SMS 備用:使用 AWS RCS 代理程式和 SMS 電話號碼建立電話集區,以在 RCS 無法交付時自動回到 SMS。請參閱 使用電話集區的 RCS 到 SMS 備用

  • 在生產國家/地區啟動:提交國家/地區啟動註冊,以傳送 RCS 訊息給美國和加拿大的所有收件人。請參閱 在國家/地區啟動 RCS

用於 RCS 設定的 AI 代理器提示

如果您使用生成式 AI 編碼助理或 AI 代理程式,您可以使用下列提示來取得建立 AWS RCS 代理程式、提交測試註冊,以及使用 CLI AWS 傳送第一個測試訊息的協助。

注意

複製下列提示並貼到您的 AI 代理器或編碼助理:

## RCS Setup Assistant Prompt Help me set up RCS messaging in AWS End User Messaging using the AWS CLI. The service is `pinpoint-sms-voice-v2`. Walk me through each step with exact CLI commands. Ask me for all required details before generating any commands. **Important rules for generating commands:** - All commands use the `pinpoint-sms-voice-v2` service. - Use `create-rcs-agent` exactly as spelled — NOT `create-r-c-s-agent`. - Use the term "testing" — NOT "sandbox". - There is NO `describe-messages` API. Do not generate it. - `create-rcs-agent` does NOT accept brand asset parameters (no display name, no logo, no banner, no color). Brand assets are registration fields only. - `create-verified-destination-number` uses `--rcs-agent-id`, NOT `--origination-identity`. ### Step 1: Create an RCS Agent Use `create-rcs-agent`. This creates the agent resource only. Optional parameters: `--deletion-protection-enabled`, `--opt-out-list-name`, `--tags`. The response returns `RcsAgentId` and `RcsAgentArn` — save both. ### Step 2: Create and submit a testing registration This configures brand assets and submits for approval. It requires multiple API calls in sequence: a. `create-registration --registration-type TEST_RCS_LAUNCH_REGISTRATION` → returns `RegistrationId`. Save it. b. `create-registration-association --registration-id <id> --resource-id <agent-id>` → links the registration to the agent. c. Upload images as attachments (two calls): `create-registration-attachment --attachment-body fileb://<logo-path>` `create-registration-attachment --attachment-body fileb://<banner-path>` → each returns `RegistrationAttachmentId`. Save both. d. Set ALL required registration fields using `put-registration-field-value` with `--registration-id`, `--field-path`, and the appropriate value flag (`--text-value`, `--select-choices`, or `--registration-attachment-id`). Required fields (ALL must be set or registration will be DENIED): - `agentDetails.brandName` (text, 2-65 chars) - `agentDetails.serviceName` (text, 1-100 chars) - `agentDetails.senderDisplayName` (text, 1-40 chars) - `agentDetails.useCase` (select: OTP, TRANSACTIONAL, PROMOTIONAL, MULTI_USE) - `agentDetails.agentDescription` (text, 1-100 chars) - `agentDetails.logoImage` (attachment ID from step c, 224x224 PNG) - `agentDetails.bannerImage` (attachment ID from step c, 1440x448 PNG/JPEG) - `agentDetails.accentColor` (text, hex code e.g. #0066CC) - `agentDetails.privacyPolicyUrl` (text, valid URL) - `agentDetails.termsAndConditionsUrl` (text, valid URL) - `agentDetails.averageMonthlyRcsFrequency` (select: 10, 100, 1000+) - `agentDetails.monthlyRcsVolume` (text, 1-100000) - At least ONE contact method WITH its label: agentDetails.contactWebsite + agentDetails.contactWebsiteLabel, OR agentDetails.contactPhoneNumber + agentDetails.contactPhoneLabel, OR agentDetails.contactEmailAddress + agentDetails.contactEmailLabel e. Verify all fields: `describe-registration-field-values --registration-id <id>` Any field showing `DeniedReason: MISSING_REQUIRED_FIELD` must be set. f. Submit: `submit-registration-version --registration-id <id>` g. Poll status: `describe-registrations --registration-ids <id>` Wait for `RegistrationStatus: COMPLETE`. **Error recovery:** If registration is DENIED, you must: 1. `create-registration-version --registration-id <id>` (creates new draft) 2. Re-populate ALL fields from scratch (new versions do NOT inherit values) 3. Fix the issue noted in `DeniedReasons` 4. Re-submit ### Step 3: Add a test device **Prerequisite:** Step 2 must be COMPLETE and the agent's `TestingAgent.Status` must be `ACTIVE` (check with `describe-rcs-agents`). Then wait at least 120 seconds after the agent becomes ACTIVE. Use `create-verified-destination-number --destination-phone-number <E.164> --rcs-agent-id <agent-id>`. The device status will be `PENDING`. The user must accept the RCS tester invitation on their physical device. Check status with `describe-verified-destination-numbers` — wait for `VERIFIED`. ### Step 4: Send a test RCS message **Prerequisite:** Step 3 device must be `VERIFIED`. Use `send-text-message --destination-phone-number <E.164> --origination-identity <agent-arn> --message-body "<text>" --message-type TRANSACTIONAL`. Returns `MessageId`. ### Step 5: Verify delivery For testing: check the test device — the message appears from the branded RCS agent. For production monitoring: set up event destinations BEFORE sending messages using `create-event-destination` (SNS, CloudWatch Logs, or Firehose). Event destinations do not retroactively capture events for already-sent messages. CloudWatch metrics in the `AWS/SMSVoice` namespace provide aggregate stats. --- **Before generating commands, ask me for:** - Brand name, service name, and sender display name - Agent description (what the agent does, what messages users receive) - Use case type: OTP, TRANSACTIONAL, PROMOTIONAL, or MULTI_USE - Logo file path (224x224 PNG) and banner file path (1440x448 PNG/JPEG) - Brand accent color hex code (e.g. #0066CC) - Privacy policy URL and terms & conditions URL - One contact method with label: website URL, phone number, or email - Estimated monthly RCS volume and per-user message frequency - Test device phone number in E.164 format (e.g. +12065550100)