disconnect method defines what happens when a connection is disconnected. Use it to revoke access tokens or perform other cleanup with the external service before credentials are erased from storage.
This method is triggered when:
- A connection is explicitly disconnected (via the API or the console UI)
- A connection is archived
Implementation
Supported implementation typesJavaScript Implementation
Input Parameters
| Parameter | Description |
|---|---|
connectorParameters | Parameters configured for the connector in your workspace. Includes client IDs, secrets, and other connector-specific configuration. |
connectionInput | Input provided by the user in the connection UI when they set up the connection. |
credentials | Current credentials of the connection that will be erased after this method completes. |
externalApiClient | API client for making requests to the external service (available if makeApiClient is defined on the connector). |