The AlarmsOne API helps you achieve all the operations that can be performed on our web client. The API requires OAuth token as an account identifier. This API is built using the REST principles which ensures predictable URLs that make writing applications easy. This API follows HTTP rules, where a wide range of HTTP clients can be used to interact with the API.
Every resource is exposed as a URL. The URL of each resource can be obtained by accessing the API Root Endpoint.
Get OAuth token:
All AlarmsOne API need to be authenticated using an OAuthtoken. You can obtain an authtoken by following the below steps:
2. Generating Grant Token:
Go to the following url with the below param.
alarmsone.alarm.READ/CREATE/UPDATE/DELETE/ALL
alarmsone.applications.READ/CREATE/UPDATE/DELETE/ALL
alarmsone.contacts.READ/CREATE/UPDATE/DELETE/ALL
alarmsone.agents.READ/CREATE/UPDATE/DELETE/ALL
alarmsone.notificationprofile.READ/CREATE/UPDATE/DELETE/ALL
alarmsone.account.READ/CREATE/UPDATE/DELETE/ALL
alarmsone.schedules.READ/CREATE/UPDATE/DELETE/ALL
alarmsone.downtime.READ/CREATE/UPDATE/DELETE/ALL
On successful authorization, Accounts will redirect to the given redirect_uri with code and state param.
3. Generate Access and Refresh Token:
After getting code from the above step, make the following URL POST call.
URL : https://accounts.zoho.com/oauth/v2/token
Method : POST
Params :
code=<Obatined in the above step.>
client_id= <Client ID obtained during Client Registration>
client_secret=<Client secret obtained during Client Registration>
redirect_uri=<Used in the above step>
grant_type=authorization_code
In this response, you will get both access_token and refresh_token.
The access_token will expire after a particular period of time (as given in expires_in param).
The refresh_token is permanent and can be used to regenerate new access_token, if the current access token expires.
4. Generate Access Token From Refresh Token
URL : https://accounts.zoho.com/oauth/v2/token
Method : POST
Params :
refresh_token =<Obtained in the above step.>
client_id= <Client ID obtained during Client Registration>
client_secret= <Client secret obtained during Client Registration>
redirect_uri=<Used in the above step>
grant_type= refresh_token
5. Revoking an Refresh Token :
URL : https://accounts.zoho.com/oauth/v2/token/revoke.
Method : POST
Params : token = <Refresh token>
6. Calling An API :
Header name should be Authorization
Header value should be Zoho-oauthtoken<space><access token>
API index: