Contents

Request a Test Notification

Ask App Store Server Notifications to send a test notification to your server.

URL

POST https://api.storekit.apple.com/inApps/v1/notifications/test

Sandbox URL

POST https://api.storekit-sandbox.apple.com/inApps/v1/notifications/test

Response Codes

StatusReasonTypeDescription
200OK
Content-Type: application/json
SendTestNotificationResponse

Successfully received your request to send a test notification.

401Unauthorized

The JSON Web Token (JWT) in the authorization header is invalid. For more information, see Generating JSON Web Tokens for API requests.

404Not Found
Content-Type: application/json
ServerNotificationURLNotFoundError

An error that indicates that the App Store server couldn’t find a notifications URL for your app in this environment. For more information, see ServerNotificationURLNotFoundError.

429
Content-Type: application/json
RateLimitExceededError

The request exceeded the rate limit.

500Internal Server Error
Content-Type: application/json
(GeneralInternalError | GeneralInternalRetryableError)

Server error. Try again later.

Mentioned in

Discussion

Use this endpoint to test if your server is receiving App Store Server Notifications at the URLs that you configured in App Store Connect. The Request a Test Notification endpoint prompts the App Store server to send your server a notification with the TEST notificationType. The App Store server sends the TEST notification to your production URL if you call this endpoint’s production URL; it sends it to your sandbox URL if you call this endpoint’s sandbox URL.

Although TEST is a version 2 notification, you can call this endpoint regardless of whether you configured your App Store Server Notifications URL in App Store Connect for version 1 or version 2. For more information about the configuration and enabling notifications, see Enter a URL for App Store server notifications and Enabling App Store Server Notifications.

This endpoint responds with a testNotificationToken in SendTestNotificationResponse. To learn the result that the App Store server recorded when it attempted to send your server the TEST notification, call the Get Test Notification Status endpoint with the testNotificationToken. Use the status information to troubleshoot your server if it’s unable to receive the TEST notification.

See Also

App Store Server Notifications testing