A Catalyst Connector provides a seamless connection between Catalyst and an external Zoho service established through Zoho OAuth authentication. You can avail the use of a connector in your Catalyst application if your business logic includes the use of an external Zoho service’s API, such as a Zoho CRM or a Zoho WorkDrive API.

Catalyst handles the connection by storing the Access Token you generate in Zoho API console for a specific application in Catalyst Cache until its expiry. After it expires, the connector will automatically fetch a new Access Token using the Refresh Token and store it in the cache. Each time the Access Token expires, the connector automatically fetches and caches a new token in the background, relieving you from the efforts of constructing the logic to maintain an uninterrupted connection with the external Zoho service in your application’s business logic.

Note: Catalyst Connectors can only be used to maintain connections with an external Zoho service, and not any third-party services. This is because, the OAuth standards maintained across all Zoho services are uniform and compatible for Catalyst to implement the Connectors feature.

Before you configure the connector in your Python business logic as shown below, you will need to register a new client in the Zoho API console, and follow the steps to generate an Authorization Code and an Access Token for the first time. You can then configure the connector with the Refresh Token received, as well as other standard OAuth parameters such as the Client ID, Client Secret, Authentication URL, and Refresh URL that are required to refresh the Access Token automatically in a periodical manner.

  • The name you provide for each connector in your logic must be unique.
  • If you create a server-based application in the Zoho API console and you allow the access token to be created for different users within the same application, then you will need to provide a different and unique connector name for each user. This is because, when the same connector is used for different users in an application, the token will be overwritten on the same cache segment resulting in fetching the wrong user’s data from the external Zoho service.

The code below illustrates a Python connector. The app reference used below is the Python object returned as a response during SDK initialization. The response returns the access token:

connector = app.connection({ 'ConnectorName': { 'client_id': {add_client_id}, 'client_secret': {add_client_secret}, 'auth_url': {add_auth_url}, 'refresh_url': {add_refresh_url}, 'refresh_token': {add_refresh_token} //Configure the OAuth params from the values returned after registering your app and generating authorization code in Zoho API console } }).get_connector('{ConnectorName}') //Provide a unique connector name for each connector you create access_token = connector.get_access_token()

Last Updated 2024-03-22 17:59:45 +0530 +0530