javascript - Where is the Token or SubscribeUrl inside the SubscriptionConfirmation request? -
i'm trying accept subscription confirmation sns using node.js.
i type endpoint console , hit subscribe.
the documentation says
after subscribe http/https endpoint, amazon sns sends subscription confirmation message http/https endpoint. message contains subscribeurl value must visit confirm subscription (alternatively, can use token value confirmsubscription).
so i'm doing preview request can find information need.
if(req.headers['x-amz-sns-message-type'] === 'subscriptionconfirmation'){ console.log('subscription confirmation requested',req.headers); console.log('body:',req.body); var arn = req.headers['x-amz-sns-subscription-arn']; var topic = req.headers['x-amz-sns-topic-arn']; res.send(200); }
i can't find subscribeurl or token in headers or in body.
the console line containing req.body prints body: {}
console line containing req.headers doesn't contain subscriptionurl or token
so it?
it's in raw data, that's is.
so had this data, access it.
Comments
Post a Comment