Server API Overview
Our API is a REST API, which supports HTTP error codes to indicate API errors and use basic HTTP authentication to authenticate user’s account. All requests body must be in JSON format, we do not support other formats. However, we’re open-minded team and we are opened for any suggestions on formats or API logic. Please, write us firstname.lastname@example.org if you have got any suggestions or issues with the API.
Authenticate your account when using the API by including your APP KEY and APP SECRET keys in the request. You can find your APP keys in the Site Settings page.
Your APP key allows to send push messages to all your subscribers database, so be careful and keep them in secret!
Authentication to the APP is performed via HTTP Basic Auth:
- Provide your application key ("APP_KEY") as the basic AUTH username value
- Provide your application secret ("APP_SECRET") as the basic AUTH password value
- All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.
// via shell // example APP_KEY = 1e26f7bb3f81e1ab789d3e20b9cf6325 // example APP_SECRET = 9bb59fcbff38b85647c421c65cca06ce curl -X \ -u "1e26f7bb3f81e1ab789d3e20b9cf6325:9bb59fcbff38b85647c421c65cca06ce" \ -H "Content-Type: application/json" \ https://uapi.gravitec.net/api/v2/push.json // or curl -X \ -u "1e26f7bb3f81e1ab789d3e20b9cf6325:9bb59fcbff38b85647c421c65cca06ce" \ -H "Content-Type: application/json" \ https://uapi.gravitec.net/api/v2/push.json