Skip to content
Back to skills

1222 Authentication 3e8c83a5

CSecurity

Airbyte Agent Connectors support multiple authentication methods depending on the underlying API. This guide covers the authentication types, how to configure them, and best practices for credential management.

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 11, 2026
securitypythongobashawsgitapici/cdsecuritydocumentation

Works with

  • terminal
  • cli
  • api

Security analysis

C68/100
  • highContains patterns that look like hardcoded API keys
  • criticalExfiltrates credentials via HTTP — exact pattern from Snyk ToxicSkills study

Pro shows the line behind each finding and how to fix it

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 1222-authentication_3e8c83a5 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 1222 Authentication 3e8c83a5?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 1222 Authentication 3e8c83a5
[![Security: C — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-1222-authentication-3e8c83a5/badge)](https://www.skillsdirectory.com/skills/tools-only-1222-authentication-3e8c83a5)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
# Authentication

Airbyte Agent Connectors support multiple authentication methods depending on the underlying API. This guide covers the authentication types, how to configure them, and best practices for credential management.

## Authentication Overview

### Authentication Types by Connector

| Connector | API Key | OAuth 2.0 | Personal Access Token |
|-----------|:-------:|:---------:|:---------------------:|
| Airtable | ✓ | | |
| Amazon Ads | | ✓ | |
| Asana | | | ✓ |
| Facebook Marketing | | ✓ | |
| GitHub | | ✓ | ✓ |
| Gong | ✓ | | |
| Google Drive | | ✓ | |
| Greenhouse | ✓ | | |
| HubSpot | ✓ | ✓ | |
| Intercom | ✓ | | |
| Jira | ✓ | | |
| Klaviyo | ✓ | | |
| Linear | ✓ | | |
| Mailchimp | ✓ | | |
| Orb | ✓ | | |
| Salesforce | | ✓ | |
| Shopify | ✓ | | |
| Slack | | | ✓ (Bot Token) |
| Stripe | ✓ | | |
| Zendesk Chat | | ✓ | |
| Zendesk Support | ✓ | ✓ | |

## API Key Authentication

The simplest authentication method. You provide an API key directly to the connector.

### Configuration

```python
from airbyte_agent_stripe import StripeConnector
from airbyte_agent_stripe.models import StripeAuthConfig

connector = StripeConnector(
    auth_config=StripeAuthConfig(
        api_key="sk_live_your_api_key"
    )
)
```

### Obtaining API Keys

| Connector | Where to Get Key |
|-----------|------------------|
| Stripe | [Dashboard > Developers > API keys](https://dashboard.stripe.com/apikeys) |
| HubSpot | Settings > Integrations > Private Apps |
| Jira | Account Settings > Security > API tokens |
| Intercom | Settings > Developers > Access tokens |
| Airtable | Account > Developer hub > Personal access tokens |

### Environment Variables

Store API keys in environment variables:

```python
import os
from dotenv import load_dotenv

load_dotenv()

connector = StripeConnector(
    auth_config=StripeAuthConfig(
        api_key=os.environ["STRIPE_API_KEY"]
    )
)
```

## Personal Access Token (PAT)

Similar to API keys but typically scoped to a user account rather than an application.

### GitHub PAT

```python
from airbyte_agent_github import GithubConnector
from airbyte_agent_github.models import GithubPersonalAccessTokenAuthConfig

connector = GithubConnector(
    auth_config=GithubPersonalAccessTokenAuthConfig(
        token="ghp_your_personal_access_token"
    )
)
```

**Creating a GitHub PAT:**
1. Go to [GitHub Settings > Developer settings > Personal access tokens](https://github.com/settings/tokens)
2. Click "Generate new token" (classic or fine-grained)
3. Select required scopes (e.g., `repo`, `read:org`)
4. Copy the token immediately (it won't be shown again)

### Slack Bot Token

```python
from airbyte_agent_slack import SlackConnector
from airbyte_agent_slack.models import SlackAuthConfig

connector = SlackConnector(
    auth_config=SlackAuthConfig(
        token="xoxb-your-bot-token"
    )
)
```

**Creating a Slack Bot Token:**
1. Go to [Slack API Apps](https://api.slack.com/apps)
2. Create a new app or select existing
3. Navigate to OAuth & Permissions
4. Add required scopes (e.g., `channels:read`, `chat:write`)
5. Install to workspace
6. Copy the Bot User OAuth Token

## OAuth 2.0

OAuth provides delegated access without sharing credentials. Connectors handle token refresh automatically.

### OAuth with Access Token

If you already have an OAuth access token:

```python
from airbyte_agent_github import GithubConnector
from airbyte_agent_github.models import GithubOauth2AuthConfig

connector = GithubConnector(
    auth_config=GithubOauth2AuthConfig(
        access_token="gho_your_oauth_token"
    )
)
```

### OAuth with Refresh Token

For long-lived access with automatic token refresh:

```python
from airbyte_agent_salesforce import SalesforceConnector
from airbyte_agent_salesforce.models import SalesforceOAuthConfig

connector = SalesforceConnector(
    auth_config=SalesforceOAuthConfig(
        client_id="your_client_id",
        client_secret="your_client_secret",
        refresh_token="your_refresh_token"
    )
)
```

The connector automatically refreshes the access token when it expires.

### Setting Up OAuth Credentials

#### Salesforce

1. Create a Connected App in Salesforce Setup
2. Enable OAuth settings
3. Add required scopes (`api`, `refresh_token`, `offline_access`)
4. Use the Consumer Key (client_id) and Consumer Secret (client_secret)
5. Complete OAuth flow to obtain refresh_token

#### HubSpot

```python
from airbyte_agent_hubspot import HubspotConnector
from airbyte_agent_hubspot.models import HubspotOAuthConfig

connector = HubspotConnector(
    auth_config=HubspotOAuthConfig(
        client_id="your_client_id",
        client_secret="your_client_secret",
        refresh_token="your_refresh_token"
    )
)
```

#### Google Drive

```python
from airbyte_agent_google_drive import GoogleDriveConnector
from airbyte_agent_google_drive.models import GoogleDriveOAuthConfig

connector = GoogleDriveConnector(
    auth_config=GoogleDriveOAuthConfig(
        client_id="your_client_id",
        client_secret="your_client_secret",
        refresh_token="your_refresh_token"
    )
)
```

## Hosted Execution (Airbyte Agent Engine)

> **Note:** `AirbyteHostedAuthConfig` has been renamed to `AirbyteAuthConfig` in the SDK.

For production deployments, you can store credentials in Airbyte Agent Engine and execute operations via API. **Sign up once, then everything is programmatic.**

### Getting Started

**One-time manual step**: Sign up at [app.airbyte.ai](https://app.airbyte.ai) and get your `airbyte_client_id` and `airbyte_client_secret` from the settings page.

After this, you can create connectors, manage credentials, and execute operations entirely through code - no UI needed.

**Prefer terminal/curl over Python?** See [Programmatic Setup](./programmatic-setup.md) for HTTP API examples with curl commands.

### Understanding `external_user_id`

The `external_user_id` is **your identifier** for the user or tenant - you define it (e.g., `"user_123"`, `"acme-corp"`, `"tenant_abc"`). It's used to:
- Scope connectors to specific users in multi-tenant applications
- Look up existing connectors when you don't have the `connector_id` cached

### Creating a New Hosted Connector

Use `create_hosted()` to register a new connector with credentials stored in Airbyte:

```python
from airbyte_agent_stripe import StripeConnector
from airbyte_agent_stripe.models import StripeAuthConfig

# Create and register a new connector
connector = await StripeConnector.create_hosted(
    external_user_id="user_123",      # Your identifier for this user/tenant
    airbyte_client_id="...",          # From app.airbyte.ai settings
    airbyte_client_secret="...",      # From app.airbyte.ai settings
    auth_config=StripeAuthConfig(api_key="sk_live_...")
)

# Connector is now registered - use it immediately
result = await connector.execute("customers", "list", {"limit": 10})
```

### Using an Existing Hosted Connector

Once a connector is created, instantiate it without `auth_config` to use the stored credentials:

```python
from airbyte_agent_stripe import StripeConnector

# Option A: Look up by external_user_id
connector = StripeConnector(
    external_user_id="user_123",      # Looks up existing connector for this user
    airbyte_client_id="...",
    airbyte_client_secret="...",
)

# Option B: Use connector_id directly (if you have it cached)
connector = StripeConnector(
    connector_id="your-connector-uuid",  # From previous create_hosted() or API
    airbyte_client_id="...",
    airbyte_client_secret="...",
)

# Operations use credentials stored in Airbyte
result = await connector.execute("customers", "list", {"limit": 10})
```

### Complete Hosted Flow Example

Here's the full flow from zero to working:

```python
import os
from airbyte_agent_gong import GongConnector
from airbyte_agent_gong.models import GongAccessKeyAuthenticationAuthConfig

# Airbyte credentials (from app.airbyte.ai settings)
AIRBYTE_CLIENT_ID = os.environ["AIRBYTE_CLIENT_ID"]
AIRBYTE_CLIENT_SECRET = os.environ["AIRBYTE_CLIENT_SECRET"]

# First time: Create the connector
connector = await GongConnector.create_hosted(
    external_user_id="acme-corp",     # Your tenant identifier
    airbyte_client_id=AIRBYTE_CLIENT_ID,
    airbyte_client_secret=AIRBYTE_CLIENT_SECRET,
    auth_config=GongAccessKeyAuthenticationAuthConfig(
        access_key=os.environ["GONG_ACCESS_KEY"],
        access_key_secret=os.environ["GONG_ACCESS_KEY_SECRET"]
    ),
)

# Subsequent calls: Just reference the existing connector
connector = GongConnector(
    external_user_id="acme-corp",
    airbyte_client_id=AIRBYTE_CLIENT_ID,
    airbyte_client_secret=AIRBYTE_CLIENT_SECRET,
)

# Execute operations
calls = await connector.execute("calls", "list", {})
```

### Server-Side OAuth Flow

For OAuth connectors, implement the OAuth flow on your server:

**Step 1: Initiate OAuth**

```bash
curl -X POST "https://api.airbyte.ai/api/v1/integrations/connectors/oauth/initiate" \
  -H "Authorization: Bearer <TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "external_user_id": "user_123",
    "connector_type": "Salesforce",
    "redirect_url": "https://yourapp.com/oauth/callback"
  }'
```

**Step 2: Redirect user to consent URL**

The response contains a `consent_url`. Redirect your user there to authorize.

**Step 3: Handle callback and create connector**

After authorization, the user is redirected to your callback URL with a `secret_id`. Use it to create the connector:

```bash
curl -X POST "https://api.airbyte.ai/api/v1/integrations/connectors" \
  -H "Authorization: Bearer <TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "external_user_id": "user_123",
    "connector_type": "Salesforce",
    "name": "User Salesforce",
    "server_side_oauth_secret_id": "<secret_id_from_callback>"
  }'
```

## Multi-Auth Connectors

Some connectors support multiple authentication methods. Choose based on your use case.

### Zendesk Support (API Token vs OAuth)

**API Token:**
```python
from airbyte_agent_zendesk_support import ZendeskSupportConnector
from airbyte_agent_zendesk_support.models import ZendeskAPITokenAuthConfig

connector = ZendeskSupportConnector(
    auth_config=ZendeskAPITokenAuthConfig(
        subdomain="yourcompany",
        email="admin@yourcompany.com",
        api_token="your_api_token"
    )
)
```

**OAuth:**
```python
from airbyte_agent_zendesk_support.models import ZendeskOAuthConfig

connector = ZendeskSupportConnector(
    auth_config=ZendeskOAuthConfig(
        subdomain="yourcompany",
        access_token="oauth_access_token"
    )
)
```

### HubSpot (Private App vs OAuth)

**Private App Token:**
```python
from airbyte_agent_hubspot.models import HubspotPrivateAppAuthConfig

connector = HubspotConnector(
    auth_config=HubspotPrivateAppAuthConfig(
        access_token="pat-na1-xxx"
    )
)
```

**OAuth:**
```python
from airbyte_agent_hubspot.models import HubspotOAuthConfig

connector = HubspotConnector(
    auth_config=HubspotOAuthConfig(
        client_id="...",
        client_secret="...",
        refresh_token="..."
    )
)
```

## Best Practices

### Credential Security

1. **Never commit credentials** to version control
2. **Use environment variables** or secret managers
3. **Rotate credentials** regularly
4. **Use minimum required scopes** for OAuth/PAT

### Environment Configuration

```python
# .env file
GITHUB_TOKEN=ghp_xxx
STRIPE_API_KEY=sk_live_xxx
SALESFORCE_CLIENT_ID=xxx
SALESFORCE_CLIENT_SECRET=xxx
SALESFORCE_REFRESH_TOKEN=xxx

# Python
import os
from dotenv import load_dotenv

load_dotenv()

# Access credentials
github_token = os.environ["GITHUB_TOKEN"]
stripe_key = os.environ["STRIPE_API_KEY"]
```

### Production Recommendations

| Environment | Recommendation |
|-------------|----------------|
| Development | `.env` file with test/sandbox credentials |
| Staging | Environment variables from CI/CD |
| Production | Secret manager (AWS Secrets Manager, HashiCorp Vault, etc.) or Airbyte Cloud hosted execution |

## Connector-Specific Documentation

Each connector's AUTH.md has complete authentication details:

- [GitHub AUTH.md](https://github.com/airbytehq/airbyte-agent-connectors/tree/main/connectors/github/AUTH.md) - PAT and OAuth
- [Stripe AUTH.md](https://github.com/airbytehq/airbyte-agent-connectors/tree/main/connectors/stripe/AUTH.md) - API Key
- [Salesforce AUTH.md](https://github.com/airbytehq/airbyte-agent-connectors/tree/main/connectors/salesforce/AUTH.md) - OAuth with refresh
- [HubSpot AUTH.md](https://github.com/airbytehq/airbyte-agent-connectors/tree/main/connectors/hubspot/AUTH.md) - Private App and OAuth
- [Zendesk Support AUTH.md](https://github.com/airbytehq/airbyte-agent-connectors/tree/main/connectors/zendesk-support/AUTH.md) - API Token and OAuth

See the connector's AUTH.md for:
- All supported authentication methods
- Required fields for each auth type
- Step-by-step credential setup
- Example code for open source and hosted execution

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.