1
API Url requested-https://pinpoint.us-east-1.amazonaws.com/v1/apps/c29387d21e1744d682f6f7a0803327c8/messages

Request body  
    {
    "Context": {},
    "MessageConfiguration": {
    "SMSMessage": {
    "Body": "string",
    "Substitutions": {},
    "SenderId": "string",
    "MessageType": "TRANSACTIONAL"
    }
    },
    "Addresses": {},
    "Endpoints":{"destinations":"+91xxxxxxxxxxx"}
    }

We have to send SMS using AWS Pinpoint service so anyone who has worked on its REST APIs.

4

1 回答 1

2

使用 AWSCLI 详细信息调用 Pinpoint REST API:https ://aws.amazon.com/cli/

此处提供了带有示例请求的文档:https ://docs.aws.amazon.com/pinpoint/latest/apireference/welcome.html

这是分步说明:

  1. 转到 IAM 管理控制台并找到与您要使用的账户关联的用户。
  2. 查找与该 IAM 用户关联的 AccessKey 和 SecretKey
  3. 使用在步骤 2 中找到的凭证配置您的 AWSCLI

这是一个cli示例:

aws --region=$REGION_ARG pinpoint send-messages --application-id $APP_ID --message-request "{ \"Addresses\": { \"$PHONE_NUMBER\": { \"ChannelType\": \"SMS\" } }, \"MessageConfiguration\": { \"SMSMessage\": { \"Body\": \"MSS Test\", \"MessageType\": \"TRANSACTIONAL\" } } }"

于 2018-02-21T22:42:22.390 回答