Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (19.1k points)

I am trying to send push notifications through amazon sns. When I manually created GCm application at amazon and application endpoint it gives following error

{Message Body: {"GCM":"{\"collapse_key\":\"Welcome\",\"data\":{\"message\":\"Hello World!\"},\"delay_while_idle\":true,\"time_to_live\":125,\"dry_run\":false}"}}

{Message Attributes:}

May 12, 2015 11:10:09 AM com.amazonaws.http.AmazonHttpClient logRequestId

INFO: x-amzn-RequestId: 60749365-b72d-5a0e-8eca-deae2ca89839

Caught an AmazonServiceException, which means your request made it to Amazon SNS, but was rejected with an error response for some reason.

Error Message:    Invalid parameter: TargetArn Reason: No endpoint found for the target arn specified (Service: AmazonSNS; Status Code: 400; Error Code: InvalidParameter; Request ID: 60749365-b72d-5a0e-8eca-deae2ca89839)

HTTP Status Code: 400

AWS Error Code:   InvalidParameter

Error Type:       Client

Request ID:       60749365-b72d-5a0e-8eca-deae2ca89839

but when I create application and endpoint arns in java it says

{EndpointArn:` arn:aws:sns:us-west-1:891575093309:endpoint/GCM/TestApp/3a1b5884-1533-3997-a819-9f362c3126f7}

{Message Body: {"GCM":"{\"collapse_key\":\"Welcome\",\"data\":{\"message\":\"Hello World!\"},\"delay_while_idle\":true,\"time_to_live\":125,\"dry_run\":false}"}}

{Message Attributes:}

Published! 

{MessageId=e5f9452e-09c7-5a94-9cf1-08e597674c00}

but I didn't receive any notifications. Please, anyone who has luckily implemented it...

1 Answer

0 votes
by (44.4k points)
edited by

The issue was with GCM enabled google app I created new and used its server api key all worked fine..

Related questions

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
asked Oct 10, 2019 in AWS by yuvraj (19.1k points)
0 votes
1 answer
asked Mar 14, 2021 in Azure by dev_sk2311 (45k points)

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...