I am trying to implement AWS Push notifications in my mobile application using GCM. As part of registering the GCM token with AWS, I am trying to create the endpoint with AWS using API [CreatePlatformEndpoint] http://docs.aws.amazon.com/sns/latest/api/API_CreatePlatformEndpoint.html. As part of calculating the Signature, i am following below website
http://docs.aws.amazon.com/general/latest/gr/signature-version-2.html#API_SignatureSampleCode
I have used below code for creating Signature Version for AWS
http://docs.aws.amazon.com/AWSECommerceService/latest/DG/AuthJavaSampleSig2.html
I am able to create below URL
Here is the response i got.
<ErrorResponse xmlns="http://sns.amazonaws.com/doc/2010-03-31/">
<Error>
<Type>Sender</Type>
<Code>SignatureDoesNotMatch</Code>
<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.
</Message>
</Error>
<RequestId>f00722e6-d9cb-5747-ab51-6ed62f2d6b75</RequestId>
</ErrorResponse>
Can someone guide what is the error?