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.
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)
)
Release files for zoho-oauth2 1.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| zoho_oauth2-1.0.7.tar.gz | 4.7 kB | Details |
Release files / zoho_oauth2-1.0.7.tar.gz
| Download URL | zoho_oauth2-1.0.7.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b2018cb92fa90a1e13bc03262d242db67c565e099d3771cb80be8f502517248e
|
|
BLAKE2b-256 checksum How to use checksums |
19851ed771c9aedca672ec54f8e42a9258d3cef106ed3ded8e9c300bbb252c79
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.6rc1
|