Socket
Socket
Sign inDemoInstall

zoho-oauth2

Package Overview
Dependencies
0
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    zoho-oauth2

Implements OAuth2.0 flow to use ZOHO API.


Maintainers
1

Readme

Zoho API - OAuth 2.0

Uses OAuth 2.0 for generating access_tokens for using Zoho APIs.

Installation

Install the package using pip.

pip install zoho-oauth2

Generate required credentials

  • CLIENT_ID
  • CLIENT_SECRET

Generate the two values from https://api-console.zoho.com/. Add a self client, and copy the CLIENT_ID and CLIENT_SECRET as seen in the example below.

  • redirect_uri

Add the redirect uri of your instance.

  • scope

You can find the list of scopes in the api documentation of the products you wish to use the API for.

  • region

Select the region if required. Chooses https://accounts.zoho.com by default. Following regions are supported as per Zoho Documentation.

EU : https://accounts.zoho.eu

CN : https://accounts.zoho.com.cn

IN : https://accounts.zoho.in

API Documentation

The access tokens have only been tested with Manage Engine Service Desk instance in a demo environment, although it should work with most Zoho products.

Learn more about the APIs from the link below.

Available methods to use.

  • To generate the access token for making the API Requests.
    ZohoAPITokens(
        client_id=CLIENT_ID, #Required
        client_secret=CLIENT_SECRET, #Required
        redirect_uri=REDIRECT_URI, #Required
        scope=SCOPES(as string, each scope separated by comma), #Required
        region=REGION #Optional
    )
  • To revoke the refresh token. The method will revoke the access token and proceed with deleting the token.pickle file.
    revokeRefreshToken()

Example Usage

from zoho_oauth2 import ZohoAPITokens

if __name__ == '__main__':
    test = ZohoAPITokens(
        client_id=CLIENT_ID,
        client_secret=CLIENT_SECRET,
        redirect_uri=REDIRECT_URI,
        scope=SCOPES(as string, each scope separated by comma)
    )

Keywords

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc