Connectors

Catalyst Connectors manage the access token, by refreshing it automatically on expiry. In the background, it will be using the Catalyst Cache for its implementation. A Connector is illustrated with the following code block.

The promise returned here will be resolved to an access token string

Copiedvar connector = app
 .connection({
 ConnectorName: {
   client_id: '{client_id}',
   client_secret: '{client_secret}',
   auth_url: '{auth_url}',
   refresh_url: '{refresh_url}',
   refresh_token: '{refresh_token}'
  }
 })
 .getConnector('ConnectorName');
 connector.getAccessToken().then((accessToken) => {
		// your logic comes here
});