Amazon SNS: how to get token for confirm subscription

前端 未结 1 880
一生所求
一生所求 2021-01-21 02:36

Following creates a subscription waiting to be confirmed.

aws_client.subscribe(TopicArn=topic_arn, Protocol=protocol, Endpoint=endpoint)

respo

相关标签:
1条回答
  • 2021-01-21 03:28

    It seems, the Token is not available from inside the response of the subscribe command itself. Rather, as mentioned in the Boto 3 documentation, the token is

    "...sent to the endpoint by an earlier Subscribe action." (emphasis mine)

    The AWS CLI Command Reference states the same thing, but a little bit more clearly perhaps:

    "Short-lived token sent to an endpoint during the subscribe action." (emphasis mine)

    In other words, for an Email Endpoint, the Token is in the email itself. You can see it if you look at the URL for the "Confirm subscription" Link.

    For example, it will look something like https://sns.us-east-1.amazonaws.com/confirmation.html?TopicArn=arn:aws:sns:us-east-1:123456789:my-aws-topic&Token=abc123&Endpoint=address@email.com

    Here in this example, you can see the Token would be abc123.

    0 讨论(0)
提交回复
热议问题