React native 使用pinpoint向特定登录用户发送推送通知
我正在开发一款与aws amplify和aws mobile hub集成的react本机应用程序 我们目前已将用户登录到cognito 我正在尝试向特定的端点Id发送推送通知,但在pinpoint only getEnpoint的node js(im使用lambda)文档中,我看不到如何设置该端点Id,但需要EnpointId,我找不到它在哪里React native 使用pinpoint向特定登录用户发送推送通知,react-native,aws-lambda,aws-amplify,aws-pinpoint,React Native,Aws Lambda,Aws Amplify,Aws Pinpoint,我正在开发一款与aws amplify和aws mobile hub集成的react本机应用程序 我们目前已将用户登录到cognito 我正在尝试向特定的端点Id发送推送通知,但在pinpoint only getEnpoint的node js(im使用lambda)文档中,我看不到如何设置该端点Id,但需要EnpointId,我找不到它在哪里 app.post('/asdf/get/endpoint', function (req, res) { pinpoint.getEndpoint
app.post('/asdf/get/endpoint', function (req, res) {
pinpoint.getEndpoint({
ApplicationId: APP_ID_PINPOINT,
EndpointId: req.body.userId
}, (err, data) => {
if (err) {
res.json({ error: err });
} else {
res.json({ data: data });
}
});
});
如何将enpointId(userId)设置为一个已经登录的用户,然后每次我需要向他发送推送时,我就获取该enpoint并向连接到它的所有设备发送推送
或者,我必须存储来自用户(DynamoDb)的所有令牌,并分别向所有设备发送消息?(带有pinpoint sendMessage)