Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/webpack/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
React native 使用pinpoint向特定登录用户发送推送通知_React Native_Aws Lambda_Aws Amplify_Aws Pinpoint - Fatal编程技术网

React native 使用pinpoint向特定登录用户发送推送通知

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

我正在开发一款与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({
    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)