AWS SNS 发布始终禁用端点(无效令牌)
AWS SNS publishing always disables endpoint (invalid token)
我正在尝试使用 Lambda 函数通过 SNS 向 iOS 设备发送通知,但每次发送时,端点的状态都会更改为 false,并且 CloudWatch 中会出现错误说无效令牌(下方)。
我已经确认令牌与 phone 的是同一个令牌,并且它正在发送到那个令牌。我现在也试了3次重新生成证书,还是出现同样的错误
CloudWatch 错误
{
"status": "FAILURE",
"notification": {
"timestamp": "2015-10-20 03:27:46.5",
"messageId": "id",
"messageMD5Sum": "sum"
},
"delivery": {
"statusCode": 8,
"dwellTimeMs": 473,
"token": "f0b1abebdbc08d4f0c46a7a0620e518af886952c9f8e21e22cff5a5fc5ca5098",
"attempts": 1,
"providerResponse": "NotificationErrorResponse(command=8, status=InvalidToken, id=1, cause=null)",
"destination": "destination endpoint arn"
}
}
问题最终是我使用的是生产证书,而且它都在开发中(从 Xcode 构建)。将所有内容切换到 SNS 中的开发应用程序修复了它。
我正在尝试使用 Lambda 函数通过 SNS 向 iOS 设备发送通知,但每次发送时,端点的状态都会更改为 false,并且 CloudWatch 中会出现错误说无效令牌(下方)。
我已经确认令牌与 phone 的是同一个令牌,并且它正在发送到那个令牌。我现在也试了3次重新生成证书,还是出现同样的错误
CloudWatch 错误
{
"status": "FAILURE",
"notification": {
"timestamp": "2015-10-20 03:27:46.5",
"messageId": "id",
"messageMD5Sum": "sum"
},
"delivery": {
"statusCode": 8,
"dwellTimeMs": 473,
"token": "f0b1abebdbc08d4f0c46a7a0620e518af886952c9f8e21e22cff5a5fc5ca5098",
"attempts": 1,
"providerResponse": "NotificationErrorResponse(command=8, status=InvalidToken, id=1, cause=null)",
"destination": "destination endpoint arn"
}
}
问题最终是我使用的是生产证书,而且它都在开发中(从 Xcode 构建)。将所有内容切换到 SNS 中的开发应用程序修复了它。