![](/img/trans.png)
[英]ping AWS SNS service to validate connection in AmazonSimpleNotificationServiceClient
[英]Amazon SNS AmazonSimpleNotificationServiceClient.Token
我目前在Windows Store应用程序中停留在CreatePlatformEndpointRequest.Token上。 我不确定从何处/如何获得此令牌。
我已经有我的包裹SID,访问密钥ID和秘密访问密钥
我的密码是
AmazonSimpleNotificationServiceClient sns = new AmazonSimpleNotificationServiceClient("secret", "secret", RegionEndpoint.EUWest1);
d("creating platform endpoint request");
CreatePlatformEndpointRequest createPlatformEndpointRequest = new CreatePlatformEndpointRequest();
createPlatformEndpointRequest.PlatformApplicationArn = "arn:aws:sns:eu-west-1:XXXXXXXXXX:app/WNS/AmazonSNS";
createPlatformEndpointRequest.Token = "what token?";
d("endpoint result");
CreatePlatformEndpointResult createPlatformEndpointResult = await sns.CreatePlatformEndpointAsync(createPlatformEndpointRequest);
d("endpoint arn: " + createPlatformEndpointResult.EndpointArn);
我收到以下错误
"Invalid parameter: Token Reason: Notification Channel URI is not valid"
当然,这是我使用的令牌“什么令牌?” 如何以及在何处获取令牌值?
提前致谢
通知服务为设备上的应用程序创建的唯一标识符。 令牌的具体名称会有所不同,具体取决于所使用的通知服务。 例如,将APNS用作通知服务时,您需要设备令牌。 或者,当使用GCM或ADM时,等效的设备令牌称为注册ID。
手动添加设备令牌或注册ID
现在,在创建端点之后,您既可以将消息直接发送到移动设备,也可以将消息发送到订阅了主题的移动设备。
参考: http : //docs.aws.amazon.com/sns/latest/dg/mobile-push-send-devicetoken.html
这有帮助吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.