Models and accounts
Grok accounts
Connecting an xAI subscription, and the account already connected
On this page(3 sections)
Begin a sign-in with a code typed on another page, see what is connected, disconnect it. The sandbox waits for the sign-in to complete on its own, so nothing is pasted back.
POST/grok/oauth/startBegin connecting a Grok account
Hands back the page to open and the one-time code to type there. Nothing is pasted back afterwards: the sandbox waits for the sign-in to complete on its own, so poll the accounts call until it appears.
What you send
Nothing. Call it as it is.
What comes back
| Field | Type |
|---|---|
urlThe page to open, which already… | string |
codeThe one-time code, shown as well… | string |
answered in this tab
curl -X POST "$SANDBOX/grok/oauth/start" \
-H "x-intentic-control: $INTENTIC_TOKEN"import { sandbox } from "@intentic/sandbox-client";
const result = await sandbox.grok.start();GET/grok/accountsConnected Grok account
What is signed in. A list for consistency with the other providers, though there is at most one.
What you send
Nothing. Call it as it is.
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 |
answered in this tab
curl "$SANDBOX/grok/accounts" \
-H "x-intentic-control: $INTENTIC_TOKEN"import { sandbox } from "@intentic/sandbox-client";
const result = await sandbox.grok.accounts();POST/grok/account/disconnectDisconnect the Grok account
Clears the stored tokens.
What you send
| Field | Type | Where |
|---|---|---|
idrequiredWhich account | string | body |
What comes back
| Field | Type |
|---|---|
okAlways true | true |
answered in this tab
curl -X POST "$SANDBOX/grok/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.grok.disconnect({
"id": "a1b2c3d4"
});More in Models and accounts