pip install zcrmsdk |
import zcrmsdk |
import zcrmsdk as your_custom_name |
import zcrmsdk as my_zoho_sdk my_zoho_sdk.ZCRMRestClient.initialize(config) |
pip install mysql-connector |
File Persistence | MySQL Persistence | Custom DB Persistence |
client_id | client_id | client_id |
client_secret | client_secret | client_secret |
redirect_uri | redirect_uri | redirect_uri |
token_persistence_path | mysql_username | persistence_handler_class |
-- | mysql_password | persistence_handler_path |
-- | mysql_port | -- |
currentUserEmail | currentUserEmail | currentUserEmail |
File Persistence | MySQL Persistence | Custom DB Persistence |
applicationLogFilePath | applicationLogFilePath | applicationLogFilePath |
sandbox | sandbox | sandbox |
access_type | access_type | access_type |
accounts_url | accounts_url | accounts_url |
apiBaseUrl | apiBaseUrl | apiBaseUrl |
apiVersion | apiVersion | apiVersion |
threading.current_thread().setattr('current_user_email','user@email.com') |
config = { "apiBaseUrl":"https://www.zohoapis.com", "apiVersion":"v2", "currentUserEmail":"email@gmail.com" "sandbox":"False" "applicationLogFilePath":"", "client_id":"1000.3xxxxxxxxxxxxxxxxxxxxxxxxX0YW", "client_secret":"29xxxxxxxxxxxxxxxxxxxxxxxxxxxxx7e32", "redirect_uri":"https://www.abc.com", "accounts_url":"https://accounts.zoho.com", "token_persistence_path":"/Users/Zoho/Desktop/PycharmProjects",//For File Persistence "access_type":"offline", //Use the below keys for MySQL DB persistence "mysql_username":"", "mysql_password":"", "mysql_port":"3306", //Use the below keys for custom DB persistence "persistence_handler_class" : "Custom", "persistence_handler_path": "/Users/Zoho/Desktop/PythonSDK/CustomPersistance.py" } |
zcrmsdk.ZCRMRestClient.initialize(config) oauth_client = zcrmsdk.ZohoOAuth.get_client_instance() grant_token = "paste_grant_token_here" oauth_tokens = oauth_client.generate_access_token(grant_token) |
Writer is a powerful online word processor, designed for collaborative work.