-
Notifications
You must be signed in to change notification settings - Fork 13
docs: add Discord, Amplitude, Mixpanel, and Stripe connectors #910
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
03b9f8f
docs: add Discord Bot connector, sync Discord tool drift, document bo…
Pranesh-Raghu 5e45797
docs: add Amplitude Analytics and Amplitude Experiment Management con…
Pranesh-Raghu d15794d
docs: add Mixpanel Analytics/Ingestion/Compliance and Stripe connectors
Pranesh-Raghu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+392 KB
...ets/docs/agent-connectors/amplitudeexperimentmanagement/management-api-keys.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
112 changes: 112 additions & 0 deletions
112
src/components/templates/agent-connectors/_setup-amplitudeanalytics.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,112 @@ | ||
| import { Steps, Aside, Tabs, TabItem } from '@astrojs/starlight/components' | ||
|
|
||
| Register your Amplitude API Key and Secret Key with Scalekit so it can authenticate and proxy requests on behalf of your users. Amplitude uses HTTP Basic Auth — the API Key is the username and the Secret Key is the password. There is no redirect URI or OAuth flow. | ||
|
|
||
| <Steps> | ||
| 1. ### Find your Amplitude data residency region | ||
|
|
||
| Amplitude runs two separate data residency regions with different credentials and API hosts. Before generating keys, confirm which region your project (or organization) lives in: | ||
|
|
||
| | Region | API host | | ||
| |--------|----------| | ||
| | US (default) | `amplitude.com` | | ||
| | EU | `analytics.eu.amplitude.com` | | ||
|
|
||
| <Aside type="caution" title="Region must match your keys"> | ||
| An API Key and Secret Key generated in one region will not authenticate against the other. Using the wrong region in Scalekit causes every request to fail. | ||
| </Aside> | ||
|
|
||
| 2. ### Get your API Key | ||
|
|
||
| - Sign in to Amplitude and go to **Settings** → **Agent Connectors** (or **API and Secret Keys**) → **API Keys**. | ||
| - Click **Generate API Key**, or copy an existing key's value. | ||
|
|
||
|  | ||
|
|
||
| 3. ### Get your Secret Key | ||
|
|
||
| - Click the **Secret Keys** tab. | ||
| - Click **Show** next to the secret key that matches the API key you copied in step 2, and copy it. | ||
|
|
||
|  | ||
|
|
||
| <Aside type="note" title="Project vs. organization credentials"> | ||
| Most tools need **project-level** API Key and Secret Key. DSAR (data subject access request) tools need a separate connected account using **organization-level** credentials in the same fields. Use two different connected accounts if you need both. | ||
| </Aside> | ||
|
|
||
| 4. ### Create a connection in Scalekit | ||
|
|
||
| - In the [Scalekit dashboard](https://app.scalekit.com), go to **AgentKit** → **Connections** → **Create Connection**. | ||
| - Search for **Amplitude Analytics** and click **Create**. | ||
| - Note the **Connection name** — use this as `connection_name` in your code (e.g., `amplitudeanalytics`). | ||
|
|
||
| 5. ### Add a connected account | ||
|
|
||
| Connected accounts link a specific user identifier in your system to an Amplitude API Key, Secret Key, and region. Add them via the dashboard for testing, or via the Scalekit API in production. | ||
|
|
||
| **Via dashboard (for testing)** | ||
|
|
||
| - Open the connection and click the **Connected Accounts** tab → **Add account**. | ||
| - Fill in **Your User's ID**, **API Key**, **Secret Key**, and select the **Data Residency Region** that matches your keys. | ||
| - Click **Save**. | ||
|
|
||
| **Via API (for production)** | ||
|
|
||
| <Tabs syncKey="tech-stack"> | ||
| <TabItem label="Node.js"> | ||
| ```ts | ||
| // US region (default) — omit `domain` or set it to 'amplitude.com' | ||
| await scalekit.connect.upsertConnectedAccount({ | ||
| connectionName: 'amplitudeanalytics', | ||
| identifier: 'user@example.com', | ||
| credentials: { | ||
| username: 'your-amplitude-api-key', | ||
| password: 'your-amplitude-secret-key', | ||
| domain: 'amplitude.com', | ||
| }, | ||
| }) | ||
|
|
||
| // EU region | ||
| await scalekit.connect.upsertConnectedAccount({ | ||
| connectionName: 'amplitudeanalytics', | ||
| identifier: 'eu-user@example.com', | ||
| credentials: { | ||
| username: 'your-eu-amplitude-api-key', | ||
| password: 'your-eu-amplitude-secret-key', | ||
| domain: 'analytics.eu.amplitude.com', | ||
| }, | ||
| }) | ||
| ``` | ||
| </TabItem> | ||
| <TabItem label="Python"> | ||
| ```python | ||
| # US region (default) — omit domain or set it to "amplitude.com" | ||
| scalekit_client.connect.upsert_connected_account( | ||
| connection_name="amplitudeanalytics", | ||
| identifier="user@example.com", | ||
| credentials={ | ||
| "username": "your-amplitude-api-key", | ||
| "password": "your-amplitude-secret-key", | ||
| "domain": "amplitude.com", | ||
| }, | ||
| ) | ||
|
|
||
| # EU region | ||
| scalekit_client.connect.upsert_connected_account( | ||
| connection_name="amplitudeanalytics", | ||
| identifier="eu-user@example.com", | ||
| credentials={ | ||
| "username": "your-eu-amplitude-api-key", | ||
| "password": "your-eu-amplitude-secret-key", | ||
| "domain": "analytics.eu.amplitude.com", | ||
| }, | ||
| ) | ||
| ``` | ||
|
Pranesh-Raghu marked this conversation as resolved.
|
||
| </TabItem> | ||
| </Tabs> | ||
|
|
||
| <Aside type="tip" title="Running both regions side by side"> | ||
| If your organization has projects in both the US and EU, create a separate connected account per user (or per project) with the matching `domain` value. Scalekit routes each account's requests to the correct regional host automatically — you don't need separate connections. | ||
| </Aside> | ||
|
|
||
| </Steps> | ||
106 changes: 106 additions & 0 deletions
106
src/components/templates/agent-connectors/_setup-amplitudeexperimentmanagement.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,106 @@ | ||
| import { Steps, Aside, Tabs, TabItem } from '@astrojs/starlight/components' | ||
|
|
||
| Register your Amplitude Experiment Management API key with Scalekit so it can authenticate and proxy requests on behalf of your users. This connector uses a Bearer token — there is no redirect URI or OAuth flow. | ||
|
|
||
| <Steps> | ||
| 1. ### Find your Amplitude Experiment data residency region | ||
|
|
||
| Amplitude Experiment runs two separate data residency regions with different keys and API hosts. Before generating a key, confirm which region your project lives in: | ||
|
|
||
| | Region | API host | | ||
| |--------|----------| | ||
| | US (default) | `experiment.amplitude.com` | | ||
| | EU | `experiment.eu.amplitude.com` | | ||
|
|
||
| <Aside type="caution" title="Region must match your key"> | ||
| A Management API key generated in one region will not authenticate against the other. Using the wrong region in Scalekit causes every request to fail. | ||
| </Aside> | ||
|
|
||
| <Aside type="note" title="Separate from the Analytics Secret Key"> | ||
| This is a different credential from the API Key + Secret Key used by the Amplitude Analytics connector. Generate it from Amplitude's **Experiment** product, not the account-level **API and Secret Keys** page. | ||
| </Aside> | ||
|
|
||
| 2. ### Get your Management API key | ||
|
|
||
| - Sign in to Amplitude and go to **Experiment** → **Management API** in the left sidebar. | ||
| - Select the **Project** you want a key for. | ||
| - Click **Create key for project**, or copy an existing key's value from the list. | ||
|
|
||
|  | ||
|
|
||
| <Aside type="tip" title="Manager or Admin role required"> | ||
| Generating a Management API key requires the Manager or Admin role on the Amplitude organization. If **Create key for project** is disabled, ask an org admin to grant you access or generate the key for you. | ||
| </Aside> | ||
|
|
||
| 3. ### Create a connection in Scalekit | ||
|
|
||
| - In the [Scalekit dashboard](https://app.scalekit.com), go to **AgentKit** → **Connections** → **Create Connection**. | ||
| - Search for **Amplitude Experiment Management** and click **Create**. | ||
| - Note the **Connection name** — use this as `connection_name` in your code (e.g., `amplitudeexperimentmanagement`). | ||
|
|
||
| 4. ### Add a connected account | ||
|
|
||
| Connected accounts link a specific user identifier in your system to a Management API key and region. Add them via the dashboard for testing, or via the Scalekit API in production. | ||
|
|
||
| **Via dashboard (for testing)** | ||
|
|
||
| - Open the connection and click the **Connected Accounts** tab → **Add account**. | ||
| - Fill in **Your User's ID**, the **Management API Key**, and select the **Data Residency Region** that matches the key. | ||
| - Click **Save**. | ||
|
|
||
| **Via API (for production)** | ||
|
|
||
| <Tabs syncKey="tech-stack"> | ||
| <TabItem label="Node.js"> | ||
| ```ts | ||
| // US region (default) — omit `domain` or set it to 'experiment.amplitude.com' | ||
| await scalekit.connect.upsertConnectedAccount({ | ||
| connectionName: 'amplitudeexperimentmanagement', | ||
| identifier: 'user@example.com', | ||
| credentials: { | ||
| token: 'your-management-api-key', | ||
| domain: 'experiment.amplitude.com', | ||
| }, | ||
| }) | ||
|
|
||
| // EU region | ||
| await scalekit.connect.upsertConnectedAccount({ | ||
| connectionName: 'amplitudeexperimentmanagement', | ||
| identifier: 'eu-user@example.com', | ||
| credentials: { | ||
| token: 'your-eu-management-api-key', | ||
| domain: 'experiment.eu.amplitude.com', | ||
| }, | ||
| }) | ||
| ``` | ||
| </TabItem> | ||
| <TabItem label="Python"> | ||
| ```python | ||
| # US region (default) — omit domain or set it to "experiment.amplitude.com" | ||
| scalekit_client.connect.upsert_connected_account( | ||
| connection_name="amplitudeexperimentmanagement", | ||
| identifier="user@example.com", | ||
| credentials={ | ||
| "token": "your-management-api-key", | ||
| "domain": "experiment.amplitude.com", | ||
| }, | ||
| ) | ||
|
|
||
| # EU region | ||
| scalekit_client.connect.upsert_connected_account( | ||
| connection_name="amplitudeexperimentmanagement", | ||
| identifier="eu-user@example.com", | ||
| credentials={ | ||
| "token": "your-eu-management-api-key", | ||
| "domain": "experiment.eu.amplitude.com", | ||
| }, | ||
| ) | ||
| ``` | ||
| </TabItem> | ||
| </Tabs> | ||
|
|
||
| <Aside type="tip" title="Running both regions side by side"> | ||
| If your organization has Experiment projects in both the US and EU, create a separate connected account per user (or per project) with the matching `domain` value. Scalekit routes each account's requests to the correct regional host automatically. | ||
| </Aside> | ||
|
|
||
| </Steps> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 70 additions & 0 deletions
70
src/components/templates/agent-connectors/_setup-discordbot.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| import { Steps, Aside, Tabs, TabItem } from '@astrojs/starlight/components' | ||
|
|
||
| Register your Discord bot token with Scalekit so it can authenticate and proxy requests on behalf of your users. Discord Bot uses Bearer Token authentication — there is no redirect URI or OAuth flow. | ||
|
|
||
| <Steps> | ||
| 1. ### Create a Discord application and bot user | ||
|
|
||
| - Go to the [Discord Developer Portal](https://discord.com/developers/applications) and sign in with your Discord account. | ||
| - Click **New Application**, enter a name (for example, `Agent Auth`), accept the terms, and click **Create**. | ||
| - Open your application and go to **Bot** in the left sidebar. | ||
|
|
||
| 2. ### Get your bot token | ||
|
|
||
| - On the **Bot** page, under **Token**, click **Reset Token** to generate a new bot token and copy it immediately — Discord shows the full token only once. | ||
|
|
||
|  | ||
|
|
||
| <Aside type="caution" title="Keep your bot token secret"> | ||
| Anyone with your bot token can control your bot completely. If you suspect it has leaked, click **Reset Token** immediately to invalidate the old one. | ||
| </Aside> | ||
|
|
||
| 3. ### Invite the bot to a server | ||
|
|
||
| - Go to **OAuth2** > **URL Generator** in the left sidebar. | ||
| - Under **Scopes**, select **bot**. | ||
| - Under **Bot Permissions**, select the permissions your agent needs. | ||
|
|
||
|  | ||
|
|
||
| - Copy the generated URL at the bottom of the page, open it in a browser, and select a server to add the bot to. | ||
|
|
||
| 4. ### Create a connection in Scalekit | ||
|
|
||
| - In the [Scalekit dashboard](https://app.scalekit.com), go to **AgentKit** → **Connections** → **Create Connection**. | ||
| - Search for **Discord Bot** and click **Create**. | ||
| - Note the **Connection name** — use this as `connection_name` in your code (e.g., `discordbot`). | ||
|
|
||
| 5. ### Add a connected account | ||
|
|
||
| Connected accounts link a specific user identifier in your system to a Discord bot token. Add them via the dashboard for testing, or via the Scalekit API in production. | ||
|
|
||
| **Via dashboard (for testing)** | ||
|
|
||
| - Open the connection and click the **Connected Accounts** tab → **Add account**. | ||
| - Fill in **Your User's ID** and **Bot Token**, then click **Save**. | ||
|
|
||
| **Via API (for production)** | ||
|
|
||
| <Tabs syncKey="tech-stack"> | ||
| <TabItem label="Node.js"> | ||
| ```ts | ||
| await scalekit.connect.upsertConnectedAccount({ | ||
| connectionName: 'discordbot', | ||
| identifier: 'user@example.com', | ||
| credentials: { apiKey: 'your-discord-bot-token' }, | ||
| }) | ||
| ``` | ||
| </TabItem> | ||
| <TabItem label="Python"> | ||
| ```python | ||
| scalekit_client.connect.upsert_connected_account( | ||
| connection_name="discordbot", | ||
| identifier="user@example.com", | ||
| credentials={"api_key": "your-discord-bot-token"}, | ||
| ) | ||
| ``` | ||
| </TabItem> | ||
| </Tabs> | ||
|
|
||
| </Steps> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.