Claude accounts
Connecting an Anthropic subscription, and the accounts already connected
On this page(5 sections)
Begin and finish a sign-in, list what is connected with how full each account's limits were, rename one, disconnect one. A sandbox can hold several side by side.
POST/claude/oauth/startBegin connecting a Claude account
Hands back the address to send somebody to, and the proof this sandbox will need to finish the exchange. The sandbox holds the credential afterwards, not the browser.
What you send
Nothing. Call it as it is.
What comes back
| Field | Type |
|---|---|
authorizeUrlWhere to send somebody to sign… | string |
verifierKeep this and send it back… | string |
stateThe handshake's own id, sent back… | string |
curl -X POST "$SANDBOX/claude/oauth/start" \
-H "x-intentic-control: $INTENTIC_TOKEN"import { sandbox } from "@intentic/sandbox-client";
const result = await sandbox.claude.start();POST/claude/oauth/exchangeFinish connecting a Claude account
Trades the code from the sign-in for stored tokens and answers with the account it just connected. A sandbox can hold several Claude accounts side by side.
What you send
| Field | Type | Where |
|---|---|---|
coderequiredThe code the sign-in handed back | string | body |
verifierrequiredThe proof from the start of… | string | body |
staterequiredThe handshake this belongs to | string | body |
labelWhat to call the account | string | body |
What comes back
| Field | Type |
|---|---|
idThe account's id, which is what… | string |
labelWhat it is called here, which… | string |
emailWho it signs in as, in… | string |
organizationWhich organisation it belongs to, where… | string |
scopeWhat the credential is permitted to… | string |
connectedAtWhen it was connected, in milliseconds | number |
needsReauthIts stored credential can no longer… | boolean |
detailWhy, in words a person can… | string |
usageHow full its plan limits were… | object |
windows | object[] |
kind | string |
label | string |
utilization | number |
resetsAt | number |
measuredAt | number |
curl -X POST "$SANDBOX/claude/oauth/exchange" \
-H "x-intentic-control: $INTENTIC_TOKEN" \
-H "content-type: application/json" \
-d '{"code":"…","verifier":"…","state":"idle","label":"Nightly changelog"}'import { sandbox } from "@intentic/sandbox-client";
const result = await sandbox.claude.exchange({
"code": "…",
"verifier": "…",
"state": "idle",
"label": "Nightly changelog"
});GET/claude/accountsConnected Claude accounts
Each connected account with how full its plan limits were when last measured. Ask for a fresh measurement and it takes one before answering, which is slower.
What you send
| Field | Type | Where |
|---|---|---|
forceMeasure the plan limits again before… | string | query |
What comes back
| Field | Type |
|---|---|
accountsThe connected accounts | object[] |
idThe account's id, which is what… | string |
labelWhat it is called here, which… | string |
emailWho it signs in as, in… | string |
organizationWhich organisation it belongs to, where… | string |
scopeWhat the credential is permitted to… | string |
connectedAtWhen it was connected, in milliseconds | number |
needsReauthIts stored credential can no longer… | boolean |
detailWhy, in words a person can… | string |
usageHow full its plan limits were… | object |
windows | object[] |
kind | string |
label | string |
utilization | number |
resetsAt | number |
measuredAt | number |
curl "$SANDBOX/claude/accounts" \
-H "x-intentic-control: $INTENTIC_TOKEN"import { sandbox } from "@intentic/sandbox-client";
const result = await sandbox.claude.accounts();POST/claude/account/renameRename a Claude account
Changes the label one account shows under, so several are tellable apart.
What you send
| Field | Type | Where |
|---|---|---|
idrequiredWhich account | string | body |
labelrequiredThe new name | string | body |
What comes back
| Field | Type |
|---|---|
idThe account's id, which is what… | string |
labelWhat it is called here, which… | string |
emailWho it signs in as, in… | string |
organizationWhich organisation it belongs to, where… | string |
scopeWhat the credential is permitted to… | string |
connectedAtWhen it was connected, in milliseconds | number |
needsReauthIts stored credential can no longer… | boolean |
detailWhy, in words a person can… | string |
usageHow full its plan limits were… | object |
windows | object[] |
kind | string |
label | string |
utilization | number |
resetsAt | number |
measuredAt | number |
curl -X POST "$SANDBOX/claude/account/rename" \
-H "x-intentic-control: $INTENTIC_TOKEN" \
-H "content-type: application/json" \
-d '{"id":"a1b2c3d4","label":"Nightly changelog"}'import { sandbox } from "@intentic/sandbox-client";
const result = await sandbox.claude.rename({
"id": "a1b2c3d4",
"label": "Nightly changelog"
});POST/claude/account/disconnectDisconnect a Claude account
Clears the stored tokens for one account. The others stay connected.
What you send
| Field | Type | Where |
|---|---|---|
idrequiredWhich account | string | body |
What comes back
| Field | Type |
|---|---|
okAlways true | true |
curl -X POST "$SANDBOX/claude/account/disconnect" \
-H "x-intentic-control: $INTENTIC_TOKEN" \
-H "content-type: application/json" \
-d '{"id":"a1b2c3d4"}'import { sandbox } from "@intentic/sandbox-client";
const result = await sandbox.claude.disconnect({
"id": "a1b2c3d4"
});