简体   繁体   中英

Amazon SnS push notifications are not sent

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 didnot receive any notifications. Please any one who has luckily implemented it...

问题是启用了GCM的Google应用我创建了新的并使用其服务器api密钥都正常工作...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM