OneSignal
Inspect OneSignal notification delivery
Use View message for delivery counters on a single push, email, or SMS message. Use View messages for a paginated history. Both endpoints exclude Journey messages.
Documentation reviewed · 2 methods with sources
Ways to do it
API
GET /notifications/{message_id}
Read one notification's delivery counters and platform-specific status.
Read source: OneSignal View message- Requirements
- A OneSignal REST API key, app ID, and notification ID.
- Limitations
- API-sent messages remain accessible for 30 days from creation. Dashboard-sent messages remain accessible for the life of the app.
Example shell
curl --fail "https://api.onesignal.com/notifications/$ONESIGNAL_NOTIFICATION_ID?app_id=$ONESIGNAL_APP_ID" -H "Authorization: Key $ONESIGNAL_REST_API_KEY"API
GET /notifications
Read up to 50 push, email, or SMS messages per request with an optional pagination cursor.
Read source: OneSignal view messages- Requirements
- A OneSignal REST API key and app ID.
- Limitations
- Use offset or time_offset. With time_offset, send each next_time_offset cursor until the notifications array is empty.
Example shell
curl --fail --get "https://api.onesignal.com/notifications" -H "Authorization: Key $ONESIGNAL_REST_API_KEY" --data-urlencode "app_id=$ONESIGNAL_APP_ID" --data-urlencode 'limit=50'