AuthConfigs
@composio/core / AuthConfigs / AuthConfigs
Class: AuthConfigs
Defined in: ts/packages/core/src/models/AuthConfigs.ts:37
AuthConfigs class
This class is used to manage authentication configurations in the Composio SDK. Auth configs are used to configure authentication providers and settings.
Constructors
Constructor
new AuthConfigs(
client
):AuthConfigs
Defined in: ts/packages/core/src/models/AuthConfigs.ts:40
Parameters
client
Composio
Returns
AuthConfigs
Methods
create()
create(
toolkit
,options
):Promise
<{ }>
Defined in: ts/packages/core/src/models/AuthConfigs.ts:161
Create a new auth config
Parameters
toolkit
string
Unique identifier of the toolkit
options
Options for creating a new auth config
{ } | { }
Returns
Promise
<{ }>
Created auth config
Example
Link
https://docs.composio.dev/reference/auth-configs/create-auth-config
delete()
delete(
nanoid
):Promise
<unknown
>
Defined in: ts/packages/core/src/models/AuthConfigs.ts:299
Deletes an authentication configuration.
This method permanently removes an auth config from the Composio platform. This action cannot be undone and will prevent any connected accounts that use this auth config from functioning.
Parameters
nanoid
string
The unique identifier of the auth config to delete
Returns
Promise
<unknown
>
The deletion response
Throws
If the auth config doesn’t exist or cannot be deleted
Example
disable()
disable(
nanoid
):Promise
<unknown
>
Defined in: ts/packages/core/src/models/AuthConfigs.ts:369
Disables an authentication configuration.
This is a convenience method that calls updateStatus with ‘DISABLED’. When disabled, the auth config cannot be used to create new connected accounts or authenticate with third-party services, but existing connections may continue to work.
Parameters
nanoid
string
The unique identifier of the auth config to disable
Returns
Promise
<unknown
>
The updated auth config details
Throws
If the auth config cannot be found or disabled
Example
enable()
enable(
nanoid
):Promise
<unknown
>
Defined in: ts/packages/core/src/models/AuthConfigs.ts:348
Enables an authentication configuration.
This is a convenience method that calls updateStatus with ‘ENABLED’. When enabled, the auth config can be used to create new connected accounts and authenticate with third-party services.
Parameters
nanoid
string
The unique identifier of the auth config to enable
Returns
Promise
<unknown
>
The updated auth config details
Throws
If the auth config cannot be found or enabled
Example
get()
get(
nanoid
):Promise
<{ }>
Defined in: ts/packages/core/src/models/AuthConfigs.ts:224
Retrieves a specific authentication configuration by its ID.
This method fetches detailed information about a single auth config and transforms the response to the SDK’s standardized format.
Parameters
nanoid
string
The unique identifier of the auth config to retrieve
Returns
Promise
<{ }>
The auth config details
Throws
If the auth config cannot be found or an API error occurs
Throws
If the response fails validation
Example
getClient()
protected
getClient():Composio
Defined in: ts/packages/core/src/models/AuthConfigs.ts:50
Protected getter for the client instance. This is primarily used for testing purposes.
Returns
Composio
list()
list(
query?
):Promise
<{ }>
Defined in: ts/packages/core/src/models/AuthConfigs.ts:122
Lists authentication configurations based on provided filter criteria.
This method retrieves auth configs from the Composio API, transforms them to the SDK format, and supports filtering by various parameters.
Parameters
query?
Optional query parameters for filtering auth configs
Returns
Promise
<{ }>
A paginated list of auth configurations
Throws
If the query parameters or response fail validation
Example
update()
update(
nanoid
,data
):Promise
<unknown
>
Defined in: ts/packages/core/src/models/AuthConfigs.ts:259
Updates an existing authentication configuration.
This method allows you to modify properties of an auth config such as credentials, scopes, or tool restrictions. The update type (custom or default) determines which fields can be updated.
Parameters
nanoid
string
The unique identifier of the auth config to update
data
The data to update, which can be either custom or default type
{ } | { }
Returns
Promise
<unknown
>
The updated auth config
Throws
If the update parameters are invalid
Throws
If the auth config cannot be found or updated
Example
updateStatus()
updateStatus(
status
,nanoid
):Promise
<unknown
>
Defined in: ts/packages/core/src/models/AuthConfigs.ts:324
Updates the status of an authentication configuration.
This method allows you to enable or disable an auth config. When disabled, the auth config cannot be used to create new connected accounts or authenticate with third-party services.
Parameters
status
The status to set (‘ENABLED’ or ‘DISABLED’)
"ENABLED"
| "DISABLED"
nanoid
string
The unique identifier of the auth config
Returns
Promise
<unknown
>
The updated auth config details
Throws
If the auth config cannot be found or the status cannot be updated