A simple mock of Apple Push Notification service (APNs) for testing purposes.
To start the server, run the following command:
docker run --publish 2197:2197 ghcr.io/kamilwaz/apns-mock-server:main
The endpoints are served over HTTP/2 and HTTPS.
APNs endpoints:
GET /3/device/:device_token
- sends a notification request (mocked)
Mock endpoints:
GET /mock/error-tokens
- returns error tokensPOST /mock/error-tokens
- add a new error token or update the existing onePOST /mock/reset
- clears error tokens and activityGET /mock/activity
- returns a list of APNs requests
Error token defines what status and reason should be send in reply for the given device token.
Example:
{
"device_token": "eaf5a5fb-00ca-47f1-b6ad-0c5573a2251f",
"status": 401,
"reason": "Unauthorized"
}