The toolkits API provides methods to discover available toolkits and manage toolkit-specific configurations. Toolkits are collections of related tools grouped by service (e.g., github, gmail, slack).
Methods
get()
Retrieve toolkit information.
// Get a specific toolkit by slug
async get ( slug : string ): Promise < ToolkitRetrieveResponse >
// List all toolkits with filters
async get ( query ?: ToolkitListParams ): Promise < ToolKitListResponse >
Toolkit identifier (e.g., github, slack)
Filter by category (e.g., developer-tools, communication)
Filter by management type
listCategories()
Get all toolkit categories.
async listCategories (): Promise < ToolkitRetrieveCategoriesResponse >
Example:
const categories = await composio . toolkits . listCategories ();
categories . items . forEach ( category => {
console . log ( category . slug , category . name );
});
// Output:
// developer-tools "Developer Tools"
// communication "Communication"
// productivity "Productivity"
authorize()
Authorize a user for a toolkit. Creates auth config if needed and initiates connection.
async authorize (
userId : string ,
toolkitSlug : string ,
authConfigId ?: string
): Promise < ConnectionRequest >
Toolkit to authorize (e.g., github)
Specific auth config to use. If not provided, uses the first available.
Example:
const connectionRequest = await composio . toolkits . authorize ( 'user_123' , 'github' );
if ( connectionRequest . redirectUrl ) {
console . log ( `Visit: ${ connectionRequest . redirectUrl } ` );
// Wait for user to complete OAuth flow
const connection = await connectionRequest . waitForConnection ();
console . log ( 'Connected!' , connection . id );
}
getAuthConfigCreationFields()
Get required fields for creating an auth config.
async getAuthConfigCreationFields (
toolkitSlug : string ,
authScheme : AuthSchemeType ,
options ?: { requiredOnly? : boolean }
): Promise < ToolkitAuthFieldsResponse >
Auth type: OAUTH2, API_KEY, BASIC, etc.
Return only required fields
Example:
const fields = await composio . toolkits . getAuthConfigCreationFields (
'github' ,
'OAUTH2' ,
{ requiredOnly: true }
);
fields . forEach ( field => {
console . log ( field . name , field . type , field . description );
});
// Output:
// client_id string "OAuth2 Client ID"
// client_secret string "OAuth2 Client Secret"
getConnectedAccountInitiationFields()
Get required fields for initiating a connected account.
async getConnectedAccountInitiationFields (
toolkitSlug : string ,
authScheme : AuthSchemeType ,
options ?: { requiredOnly? : boolean }
): Promise < ToolkitAuthFieldsResponse >
Example:
const fields = await composio . toolkits . getConnectedAccountInitiationFields (
'github' ,
'OAUTH2'
);
console . log ( fields ); // Fields needed to initiate connection
Types
Detailed toolkit information.
interface ToolkitRetrieveResponse {
slug : string ; // Toolkit identifier
name : string ; // Human-readable name
logo ?: string ; // Logo URL
description ?: string ; // What the toolkit provides
authConfigDetails ?: AuthConfigDetail []; // Auth requirements
categories ?: string []; // Categories this toolkit belongs to
isLocal ?: boolean ; // Local/managed toolkit
isDeprecated ?: boolean ; // Deprecated status
}
Paginated list of toolkits.
interface ToolKitListResponse {
items : ToolkitRetrieveResponse [];
nextCursor ?: string ; // Pagination cursor
totalPages ?: number ; // Total pages
}
AuthConfigDetail
Authentication configuration details.
interface AuthConfigDetail {
mode : AuthSchemeType ; // OAUTH2, API_KEY, etc.
fields : {
authConfigCreation : {
required : Field [];
optional : Field [];
};
connectedAccountInitiation : {
required : Field [];
optional : Field [];
};
};
}
Common Categories
Category Examples developer-toolsGitHub, GitLab, Bitbucket communicationSlack, Discord, Microsoft Teams productivityNotion, Asana, Trello crmSalesforce, HubSpot marketingMailchimp, SendGrid financeStripe, QuickBooks
Next Steps
Tools API Work with individual tools
Auth Configs Configure authentication
Connected Accounts Manage user connections
Installation Get started with Composio