> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended**:
> ```bash
> npx @scalekit-inc/cli setup
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for 40+ agents.
> Features: full-stack-auth, agent-auth, mcp-auth, modular-sso, modular-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Connected accounts

Connected accounts for agent workflows
<div class="sdk-client-page">

Manage connected accounts for agent tool access (AgentKit-style connections from the Python SaaSKit surface).

Prefer the AgentKit SDK docs when building agent product flows; use these methods when integrating from the Python SaaS client.

### list_connected_accounts
<div class="sdk-method-section">
  
    
      

      Runs `list_connected_accounts` and returns the result.

      
        Organization ID.
      
      
        Scalekit user ID (`usr_...`).
      
      
        Connector slug.
      
      
        End-user identifier.
      
      
        Identity provider.
      
      
        Results per page.
      
      
        Pagination token.
      
      
        Connector slug filter.
      
      
        Paginated connected accounts.
      

```python wrap showLineNumbers=false
response = scalekit_client.connected_accounts.list_connected_accounts(
    organization_id='org_123456',
    user_id='usr_123456',
    page_size=50
)

for account in response[0].connected_accounts:
    print(f'Account: {account.id}')
```

    
  
</div>

### get_connected_account_by_identifier
<div class="sdk-method-section">
  
    
      

      Method to get connected account by identifier

      
        Connector identifier
      
      
        Identifier for the connector
      
      
        Optional. Organization ID
      
      
        Optional. User ID
      
      
        Optional. ID of the connected account
      
      
        Get Connected Account By Identifier Response
      

```python wrap showLineNumbers=false
response = scalekit_client.connected_accounts.get_connected_account_by_identifier(
    'slack',
    'workspace_id',
    organization_id='org_123456',
    user_id='usr_123456'
)
```

    
  
</div>

### create_connected_account
<div class="sdk-method-section">
  
    
      

      Method to create a connected account

      
        Connector identifier
      
      
        Identifier for the connector
      
      
        Connected account details
      
      
        Optional. Organization ID
      
      
        Optional. User ID
      
      
        Create Connected Account Response
      

```python wrap showLineNumbers=false
from scalekit.v1.connected_accounts.connected_accounts_pb2 import CreateConnectedAccount

account = CreateConnectedAccount()

response = scalekit_client.connected_accounts.create_connected_account(
    'slack',
    'workspace_id',
    account,
    organization_id='org_123456',
    user_id='usr_123456'
)
```

    
  
</div>

### update_connected_account
<div class="sdk-method-section">
  
    
      

      Method to update a connected account

      
        Connector identifier
      
      
        Identifier for the connector
      
      
        Updated connected account details
      
      
        Optional. Organization ID
      
      
        Optional. User ID
      
      
        Optional. ID of the connected account to update
      
      
        Update Connected Account Response
      

```python wrap showLineNumbers=false
from scalekit.v1.connected_accounts.connected_accounts_pb2 import UpdateConnectedAccount

account = UpdateConnectedAccount()

response = scalekit_client.connected_accounts.update_connected_account(
    'slack',
    'workspace_id',
    account,
    organization_id='org_123456',
    user_id='usr_123456'
)
```

    
  
</div>

### delete_connected_account
<div class="sdk-method-section">
  
    
      

      Method to delete a connected account

      
        Connector identifier
      
      
        Identifier for the connector
      
      
        Optional. Organization ID
      
      
        Optional. User ID
      
      
        Optional. ID of the connected account to delete
      
      
        Delete Connected Account Response
      

```python wrap showLineNumbers=false
scalekit_client.connected_accounts.delete_connected_account(
    'slack',
    'workspace_id',
    organization_id='org_123456',
    user_id='usr_123456'
)
```

    
  
</div>

### get_magic_link_for_connected_account
<div class="sdk-method-section">
  
    
      

      Runs `get_magic_link_for_connected_account` and returns the result.

      
        Connector.
      
      
        Identifier.
      
      
        Organization ID.
      
      
        Scalekit user ID (`usr_...`).
      
      
        Connected account ID.
      
      
        Opaque state string.
      
      
        Post-auth verify URL.
      
      
        Authorization magic link.
      

```python wrap showLineNumbers=false
response = scalekit_client.connected_accounts.get_magic_link_for_connected_account(
    'slack',
    'workspace_id',
    organization_id='org_123456',
    user_id='usr_123456'
)

print(f'Magic Link: {response[0].magic_link}')
```

    
  
</div>

### get_connected_account_details_by_identifier
<div class="sdk-method-section">
  
    
      

      Method to get connected account details (without auth credentials) by identifier

      
        Connector identifier
      
      
        Identifier for the connector
      
      
        Optional. Organization ID
      
      
        Optional. User ID
      
      
        Optional. ID of the connected account
      
      
        The response payload for this operation.
      

    
  
</div>

### verify_connected_account_user
<div class="sdk-method-section">
  
    
      

      Method to verify a connected account user after OAuth callback

      
        Auth request ID as base64url-encoded opaque token from the
      
      
        Current logged in user's connected account identifier
      
      
        Verify Connected Account User Response
      

    
  
</div>

</div>


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
