Developer Console

Use Real-Time Notifications

This page describes how to set up Real-Time Notifications (RTN) in the developer console.

Set Up Real-Time Notifications

Follow the steps below to set up RTN in the Amazon Appstore Developer Console.

  1. Log in to the Developer Console.
  2. In the Amazon Appstore section, select App List.
  3. Select your app in the App List page.
  4. From the sidebar, select App Services and locate the Real-Time Notifications section.
  5. Select Add an Endpoint.
  6. Enter your app's HTTPS endpoint in URL for Appstore notifications.
  7. Click Submit.

After you submit your app's endpoint, Amazon verifies the URL and sends a confirmation message to your app server. You need to process the confirmation message in order to received real-time notifications. See Process Notification Messages below for more details.

Change the RTN Endpoint

You can change the endpoint for your app's RTN subscription. Find the current RTN subscriptions in the Developer Console. Go to Apps & Services > My Apps, select your app, and then click App Services. Follow the steps below to edit a Real-Time Notification:

  1. Click Add an Endpoint in the Real-Time Notification section, and then click Edit.
  2. Choose Add a new URL, or choose an endpoint that has been registered previously.
  3. Click Submit.

Your new endpoint is now under verification. You will continue to receive Real-Time Notifications to the previous endpoint until your new endpoint is verified. Amazon verifies the URL and sends a "Subscription Confirmation" message to your app server. You need to process the confirmation message in order to received real-time notifications. See Process Notification Messages below for more details.

Once verified, you will start receiving notifications in the new endpoint.

Delete Real-Time Notifications

You can delete the endpoint for your app's Real-Time Notification. Find the current RTN subscriptions in the Developer Console. Go to Apps & Services > My Apps, select your app, and then click App Services. Follow the steps below to edit a Real-Time Notification:

  1. Click Add an Endpoint in the Real-Time Notification section, and then click Edit.
  2. Find the appropriate URL and choose Remove.
  3. Click Remove on the confirmation dialog.

Processing Notification Messages

To prevent spoofing attacks, you must validate the Amazon signature to verify the authenticity of the message. For more information, see Verifying the Signatures of Amazon SNS Messages.

If you are using an Amazon AWS SDK, then the processing of HTTPS POST and signature validation is handled for you. See the code snippets below for reference.

If you do not use an Amazon AWS SDK, follow the guidelines to handle the HTTPS POST request and signature validation steps described in Verifying the Signatures of Amazon SNS Messages.

RTN Confirmation Message

After you add your endpoint to RTN in the Developer Console, Amazon sends a confirmation message to your endpoint.

To process the confirmation message, find the SubscribeURL value. Make an HTTP GET request to the URL, or manually visit the URL in a browser.

You can confirm RTN automatically with Amazon SNS. Use the DefaultSnsMessageHandler to confirm RTN automatically when a SnsSubscriptionConfirmation message is received. The DefaultSnsMessageHandler implements all message types except for SnsNotification. See Amazon SNS documentation for more information on SNS messages.

Notification

Your endpoint needs to return a 200 response code status to the POST request. If your server can't be reached, or returns a 4xx code, the message will not be retried.

If your endpoint does not respond within the timeout limit of 15 seconds or returns a response outside of 200-4xx code, the message delivery is considered a failed attempt and will be retried.


Last updated: Nov 13, 2021