1

I want to send push notifications to mobile apps using REST API provided by AWS. I read their documentation but i am getting an error unauthorized. Does any one able to send push notification using REST API ?

The following is an example of a REST request int the documentation

GET /v1/apps/a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6/campaigns
Accept: application/json
Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20161127/us- 
   east-1/mobiletargeting/aws4_request, SignedHeaders=accept;host;x-amz-date, 
   Signature=a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6a1b2c3d4e5f6
Host: pinpoint.us-east-1.amazonaws.com
X-Amz-Date: 20161127T202324Z

Following is the error I am getting

The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details

Amila Dulanjana
  • 1,884
  • 1
  • 16
  • 33

1 Answers1

1

Currently, if I specify my AWS AccessKey & SecretKey in the Postman Environment as per the Amazon Pinpoint tutorial with POSTMAN I also get the same error message : The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details..

To get this setup working, I have specified my AWS AccessKey & SecretKey in Postman Authorization tab as illustrated below :

enter image description here

Below is a screenshot of the push notification message received on my Android phone:

enter image description here

aksyuma
  • 2,957
  • 1
  • 15
  • 29