Confirm HTTP SNS Subscription

I created an Amazon SNS theme and added 2 subscriptions.

  • My email id that works great after confirmation.
  • The http address of the amazon ec2 instance.

Now the problem is that I cannot figure out how to confirm the subscription to the HTTP URL. I do not see a request to send apache access.log. Should I look elsewhere for a message.

I already have a rails project deployed through the passenger on the server. Should I check email request through rails code?

+7
source share
1 answer

The same problem, actually it is RAW POST, you can read it with:

$post = file_get_contents('php://input'); 

put it in the recipient's URL, and if you want, for example, send it by email to see it.

After that, you can confirm: http://docs.amazonwebservices.com/sns/latest/api/API_ConfirmSubscription.html

Source: https://forums.aws.amazon.com/message.jspa?messageID=364666#364666

EDIT: this is actually in JSON, and there is a "SubscribeURL" variable, copy the insert in the navigator and confirm the subscription!

Edit 2: Sorry for php, it seems in rails it is turned on:

 request.raw_post 

request.raw_post is trying to extract data from it

+9
source

All Articles