API ReferenceTool Router

Create a link session for a toolkit in a tool router sessionv3.1

Markdown
POST
/api/v3.1/tool_router/session/{session_id}/link

Initiates an authentication link session for a specific toolkit within a tool router session. Returns a link token and redirect URL that users can use to complete the OAuth flow.

x-api-key<token>

Project API key authentication

In: header

Path Parameters

session_idstringRequired

The unique identifier of the tool router session

Format: toolRouterSessionId

Request Body

application/json

toolkitstringRequired

The unique slug identifier of the toolkit to connect

aliasstring

A human-readable alias for this connected account. Must be unique per entity and toolkit within the project.

callback_urlstring

URL where users will be redirected after completing auth

Format: uri
experimentalobject

Experimental features - not stable, may be modified or removed in future versions.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://backend.composio.dev/api/v3.1/tool_router/session/trs_LX9uJKBinWWr/link" \  -H "Content-Type: application/json" \  -d '{    "toolkit": "github"  }'
{
  "link_token": "lt_abc123xyz",
  "redirect_url": "https://app.composio.dev/link/lt_abc123xyz",
  "connected_account_id": "ca_abc123xyz",
  "experimental": {
    "account_type": "PRIVATE",
    "acl_config_for_shared": {
      "allow_all_users": true,
      "allowed_user_ids": [
        "string"
      ],
      "not_allowed_user_ids": [
        "string"
      ]
    }
  }
}
{
  "error": {
    "message": "string",
    "code": 0,
    "slug": "string",
    "status": 0,
    "request_id": "string",
    "suggested_fix": "string",
    "errors": [
      "string"
    ]
  }
}
{
  "error": {
    "message": "string",
    "code": 0,
    "slug": "string",
    "status": 0,
    "request_id": "string",
    "suggested_fix": "string",
    "errors": [
      "string"
    ]
  }
}
{
  "error": {
    "message": "string",
    "code": 0,
    "slug": "string",
    "status": 0,
    "request_id": "string",
    "suggested_fix": "string",
    "errors": [
      "string"
    ]
  }
}
{
  "error": {
    "message": "string",
    "code": 0,
    "slug": "string",
    "status": 0,
    "request_id": "string",
    "suggested_fix": "string",
    "errors": [
      "string"
    ]
  }
}
{
  "error": {
    "message": "string",
    "code": 0,
    "slug": "string",
    "status": 0,
    "request_id": "string",
    "suggested_fix": "string",
    "errors": [
      "string"
    ]
  }
}