129 lines
5.5 KiB
Markdown
129 lines
5.5 KiB
Markdown
# composio-autoreg
|
||
|
||
Autoreg for [Composio](https://composio.dev) accounts and `ck_...` consumer API keys.
|
||
|
||
Free tier: **$0, no card**, $2 credits one-time, up to 3 members, **10,000 tool calls/month**, all 1,700+ toolkits connectable.
|
||
Instant tools (Exa, Apollo, Higgsfield, ...) run on the $2 credit with 0% markup.
|
||
|
||
## Why a real browser
|
||
|
||
Composio runs on **WorkOS AuthKit hosted** (`login.composio.dev`, deployment `hosted-authkit-2f3c943e...`).
|
||
Pure HTTP replay dies in three places:
|
||
|
||
1. **Server-action IDs are per-deploy** and live in the RSC flight payload as `{"id":"<42 hex>","bound":null}`.
|
||
Random 40–42 hex tokens that appear "rare" in the HTML are fragments of `signalsToken`
|
||
(`Fe26.2*2*...`); POSTing them returns `404` + `x-nextjs-action-not-found: 1`.
|
||
2. **`/passkey/enroll` interstitial.** The skip control is `<button name="intent" value="skip">` inside a
|
||
client component; the form's action ID is not present in the HTML (it lives in a page chunk that
|
||
Next.js does not ship in the document). `createPasskeyChallenge` (`40bb2612...`) is *not* the submit
|
||
action — using it returns `500`.
|
||
3. **`/radar-challenge`** (WorkOS Radar) may appear as an email OTP step.
|
||
|
||
A real Chrome (headless=False) walks through all three by itself. `wave.py` only fills fields,
|
||
types the OTP and clicks the skip button.
|
||
|
||
## Files
|
||
|
||
| file | purpose |
|
||
|------|---------|
|
||
| `wave.py` | farm N accounts: signup -> OTP -> passkey skip -> key -> bank |
|
||
| `login_one.py` | single existing account: login -> skip -> key (debug/recovery) |
|
||
| `verify_key.py` | check keys against `https://connect.composio.dev/mcp` |
|
||
|
||
## Install
|
||
|
||
```bash
|
||
python -m venv venv
|
||
venv/Scripts/pip install -r requirements.txt # playwright, requests
|
||
```
|
||
|
||
Chrome must be installed (`C:/Program Files/Google/Chrome/Application/chrome.exe`, overridable via
|
||
`CHROME_PATH`). Playwright's bundled Chromium is not used — the flow needs a real browser build.
|
||
|
||
## Pool format
|
||
|
||
`email:imap_password`, one per line (t-online IMAP is used to read the OTP):
|
||
|
||
```
|
||
user001@t-online.de:mailpassword
|
||
user002@t-online.de:mailpassword
|
||
```
|
||
|
||
## Run
|
||
|
||
```bash
|
||
# farm 5 accounts starting at pool index 10
|
||
venv/Scripts/python wave.py --pool pool.txt --start 10 --count 5
|
||
|
||
# one existing account (login path)
|
||
venv/Scripts/python login_one.py user@t-online.de 'AccountPassword' 'MailboxPassword'
|
||
```
|
||
|
||
Every attempt appends one JSON line to the bank (`--bank`, default `bank/accounts.jsonl`):
|
||
|
||
```json
|
||
{"email":"...","imap_pass":"...","password":"...","ok":true,"api_key":"ck_...","workspace":"..._workspace","ts":1794416500}
|
||
```
|
||
|
||
`wave.py` re-uses the password stored in the bank for an address it has already touched, so a failed
|
||
run can be retried without losing the account.
|
||
|
||
## Using the key
|
||
|
||
The `ck_` key is a **consumer** key and is only valid as `x-consumer-api-key` on the MCP endpoint:
|
||
|
||
```bash
|
||
curl -X POST https://connect.composio.dev/mcp \
|
||
-H 'content-type: application/json' \
|
||
-H 'accept: application/json, text/event-stream' \
|
||
-H "x-consumer-api-key: $KEY" \
|
||
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"cli","version":"1"}}}'
|
||
```
|
||
|
||
`tools/list` returns 12 meta-tools:
|
||
|
||
```
|
||
COMPOSIO_SEARCH_TOOLS COMPOSIO_GET_TOOL_SCHEMAS COMPOSIO_MULTI_EXECUTE_TOOL
|
||
COMPOSIO_PROXY_EXECUTE COMPOSIO_REMOTE_BASH_TOOL COMPOSIO_REMOTE_WORKBENCH
|
||
COMPOSIO_MANAGE_CONNECTIONS COMPOSIO_WAIT_FOR_CONNECTIONS
|
||
COMPOSIO_SEARCH_SKILLS COMPOSIO_USE_SKILL COMPOSIO_MANAGE_SKILL
|
||
COMPOSIO_SUBMIT_FEEDBACK
|
||
```
|
||
|
||
Typical call:
|
||
|
||
```bash
|
||
curl -X POST https://connect.composio.dev/mcp \
|
||
-H 'content-type: application/json' -H 'accept: application/json, text/event-stream' \
|
||
-H "x-consumer-api-key: $KEY" \
|
||
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"COMPOSIO_SEARCH_TOOLS","arguments":{"query":"gmail send email"}}}'
|
||
```
|
||
|
||
## Limits and quotas
|
||
|
||
- Free plan: **10,000 tool calls/month**, $2 credits (one-time), 3 members, no card.
|
||
- Standard: $18 / seat / month, each seat adds 10,000 tool calls + $18 credits to the shared pool.
|
||
- `backend.composio.dev/api/v3/*` requires a **project** API key or dashboard JWT; the `ck_` consumer key
|
||
gets `401 Auth_NoAuthProvided`. Use MCP, not REST.
|
||
- `/api/trpc/consumer.*` on the dashboard works only inside the authenticated browser session —
|
||
replayed fetches return `401 UNAUTHORIZED` because tRPC needs the app's own headers.
|
||
|
||
## Pitfalls
|
||
|
||
- The agent signup lane (`POST https://agents.composio.dev/api/signup`) is `DEPLOYMENT_PAUSED`.
|
||
- A fresh address must go through `/sign-up` (click the "Регистрация / Sign up" link); the entry URL
|
||
`dashboard.composio.dev/f/~/connect/clients` lands on the **login** form, which for an unregistered
|
||
email just bounces back with "invalid email or password".
|
||
- After the signup form is submitted the app moves to `/sign-up/password` — do not try to fill the email
|
||
field there, it is not rendered.
|
||
- One account hammered with wrong passwords enters a WorkOS velocity lock (500 on the password step).
|
||
Wait 10–15 minutes or use a fresh account.
|
||
- OTP mails come from `noreply@login.composio.dev`; filter by `Date >= run start`, otherwise the
|
||
signup-verification code from an earlier attempt is picked up.
|
||
- The API key is fetched by intercepting the tRPC `consumer.getToken` response
|
||
(`ck_[A-Za-z0-9_-]{16,}`) or by clicking `Copy` and reading the clipboard
|
||
(needs `permissions=["clipboard-read","clipboard-write"]`).
|
||
|
||
## Legal
|
||
|
||
For research on your own accounts. You are responsible for complying with the target's terms of service. |