Jason N
Jason N

Reputation: 151

AWS PinPoint - SMS Message From Postman

I'm trying to initiate a SMS message using Postman, but I keep getting a response indicating "Invalid Request Body". I can't seem to find a good example on the AWS documentation (Is it just me or does anyone else encounter this with AWS?)

Below is the request body I'm submitting with my request. Any help would be much appreciated!

{
    "ApplicationId": "<MyApplicationID>",
      "MessageRequest": {
        "Addresses": {
          "[{{Destination}}]": {
            "BodyOverride": "Test",
            "ChannelType": "SMS"
          }
    },
        "MessageConfiguration": {
            "SMSMessage": {
                "Body": "Test",
                "SenderId": "Test",
                "MessageType": "TRANSACTIONAL",
                "Keyword": "<MyKeyword>",
                "OriginationNumber": "<Origination number in E.164 Format>"
            }
        }
    }
}

Upvotes: 0

Views: 714

Answers (1)

aksyuma
aksyuma

Reputation: 3180

Looking at the Amazon Pinpoint SendMessages REST API, the request body doesn't include either the application-id key or MessageRequest key.

Resolution:

You will need to put the Amazon Pinpoint application-id in the URI part (or create an environmental variable) and then specify the request body as shown below :

Amazon Pinpoint SendMessages using POSTMAN

Hope this helps!

Upvotes: 1

Related Questions