API Authentication
General
The current API supports two different authentication methods: API Key based and HTTP (Deprecated) authentications.
After registration, the system generates a unique access key that allows users to verify their identity through the API.
[Deprecated] HTTP Authentication, allows users to use a combination of username and password.
In order to get the auth data, you can log in to the console panel https://console.push.delivery and go to Apps → Info page.
In the "Notification + Admin API" block you can find the "Token" (API Key) and "LegacyAuth" information.
API Key
To use the API Key, we need to add HTTP header Authorization for every API request:
Authorization: Bearer YOUR_API_KEY
For example:
curl -X GET -H "Authorization: Bearer YOUR_API_KEY" https://webpush-demo.ethinking.de/push-admin-api/v3/test/stats/tag/1
HTTP Auth (Deprecated)
To use the HTTP auth, we need to use "Username" and "Password" from "Notification + Admin API" → LegacyAuth block:
USER_NAME:USER_PASSWORD
For example:
curl -X GET -u USER_NAME:USER_PASSWORD https://webpush-demo.ethinking.de/push-admin-api/v3/test/stats/tag/1
API user access
To access APIs we need the applicable token, the applicable token for different APIs is described in following table
Subscriptions API |
Notification API |
Admin API |
|
API user |
Yes |
X |
X |
super user |
X |
Yes |
Yes |
-
In the "Subscriptions API" block you can find the "Token" (API Key) and "LegacyAuth" information called
API user
. -
In the "Notification + Admin API" block you can find the "Token" (API Key) and "LegacyAuth" information called
super user
token.