Configuring Authentication
To access Zoho data stores, you must authenticate the connection using an access token. You can do this by providing a valid access token, or by providing your Zoho credentials so that the connector initiates a OAuth 2.0 authentication flow to retrieve and use the corresponding access token.
Using an Access Token
If you already have a valid access token, you can authenticate your connection by providing the token in the connection URL.
To authenticate using an access token:
- Connect to the server using a connection URL written in the following format:
jdbc:zoho://;Host=[InstanceURL];Auth_Type=OAuth 2.0;Auth_AccessToken=[AccessToken];
The variables are defined as follows:
- [InstanceURL] is the URL of the Zoho instance.
- [AccessToken] is your access token for authenticating to Zoho.
For example:
jdbc:zoho://;Host=crm.zoho.com;Auth_Type=OAuth 2.0;Auth_AccessToken=kP9PcyQ7prK2LwUMZMpFQ4R+5VE;
Using Zoho Credentials
You can configure the connector to retrieve and use an access token based on your OAuth 2.0 application credentials. To do this, in the connection URL, provide the client ID and client secret associated with your Zoho application.
To authenticate using Zoho credentials:
- Connect to the server using a connection URL written in the following format:
jdbc:zoho://;Host=[InstanceURL];Auth_Type=OAuth_2.0;Auth_BaseRedirectUri=[YourRedirectURI];Auth_Client_ID=[YourClientID];Auth_Client_Secret=[YourClientSecret];Auth_Scope=[YourAccountScope];
The variables are defined as follows:
- [InstanceURL] is the URL of the Zoho instance.
- [RedirectURL] is redirect URL associated with your Zoho application.
- [YourClientID] is the client ID associated with your Zoho application.
- [YourClientSecret] is the client secret associated with your Zoho application.
- [YourAccountScope] is a comma-separated list of OAuth scopes for the access token. For a complete list of the supported scopes, see "Scopes" in the Zoho CRM Online Help: https://www.zoho.com/crm/developer/docs/api/oauth-overview.html#scopes.
For example:
jdbc:zoho://;Host=crm.zoho.com;Auth_Type=OAuth 2.0;Auth_BaseRedirectUri=http://localhost:1234;Auth_Client_ID=kP9PcyQ7prK2LwUMZMpFQ4R+5VE;Auth_Client_Secret=kP9PcyQ7prK2LwUMZMpFQ4R+5VE;Auth_Scope=ZohoCRM.settings.ALL;
The connector uses these settings to go through a OAuth 2.0 authentication flow and authenticate your connection to Zoho.