Go to All Forums

Migrating to OAuth 2.0 for Authenticating the Site24x7 REST APIs

Site24x7 offers a comprehensive set of documented REST APIs for your monitoring and reporting needs. To provide a more secured access to your resources, we are migrating to OAuth 2.0 protocol from authtokens for authorizing the APIs.

Why move to OAuth 2.0?

  • Access restrictions can be placed. You can decide the kind of access third party apps/scripts require for its functioning.
  • APIs can be segregated based on scopes. You can select the scopes based on your usage/requirement, and not all the APIs need to be exposed.
  • Provides a delegated access token that has an expiry time (one hour), unlike authtokens that have permanent validity.

Getting Started with OAuth 2.0:

The OAuth token can be created in 3 steps:

  • Registering your Client Application
  • Generating the Grant Token
  • Generating the Access and Refresh Tokens using the Grant Token

When making an API call, the OAuth token is passed in the Authorization header as Zoho-oauthtoken {access_token}, similar to the authtoken (Zoho-authtoken {auth_token}).

Refer our API documentation to get started!

Deprecation of Authtokens:

Creation of new authtokens will be deprecated by 31st August, 2019 and the existing ones will be deprecated by 30th November, 2019. Please update your existing code/script and migrate to OAuth 2.0 within the mentioned period.

 

Happy Monitoring!

Like (10) Reply
Replies (4)

Re: Migrating to OAuth 2.0 for Authenticating the Site24x7 REST APIs

A gentle reminder to migrate to OAuth 2.0. You cannot create new authtokens (deprecated on 31st August, 2019) and the existing ones will be deprecated by 30th November, 2019.

Like (0) Reply

Re: Re: Migrating to OAuth 2.0 for Authenticating the Site24x7 REST APIs

Hi,

Please find attached sample implementations (Python & PowerShell scripts) using OAuth 2.0 tokens. Read this article to know more on configuring Postman authorization for Site24x7 APIs.

For any questions, please comment in the below thread.

 

Regards

Mathangi

Attachments
Like (0) Reply

Re: Re: Re: Migrating to OAuth 2.0 for Authenticating the Site24x7 REST APIs

Just as an FYI, there is a bug with the Python script. While refreshing the access token using the refresh token, the refresh token will not be re-saved to the json.

In its current state the script can only generate the access token and the refresh it just one time.

Just adding one line to the refreshAccessToken() method fixed it for me.

Like (0) Reply

Re: Re: Re: Re: Migrating to OAuth 2.0 for Authenticating the Site24x7 REST APIs

Hi,

Thanks for pointing it out. Please find attached the corrected Python script. Have re-uploaded the Python file in my previous comment as well.

Hope this helps. Let us know for further queries, if any. 

 

Regards

Mathangi 

Attachments
Like (0) Reply

Was this post helpful?