intentic
Create your workspace
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

FieldType
urlThe page to open, which already…string
codeThe one-time code, shown as well…string
Try itanswered in this tab
curl
curl -X POST "$SANDBOX/grok/oauth/start" \
  -H "x-intentic-control: $INTENTIC_TOKEN"
TypeScript
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

FieldType
accountsThe connected accountsobject[]
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 millisecondsnumber
needsReauthIts stored credential can no longer…boolean
detailWhy, in words a person can…string
usageHow full its plan limits were…object
windowsobject[]
kindstring
labelstring
utilizationnumber
resetsAtnumber
measuredAtnumber
Try itanswered in this tab
curl
curl "$SANDBOX/grok/accounts" \
  -H "x-intentic-control: $INTENTIC_TOKEN"
TypeScript
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

FieldTypeWhere
idrequiredWhich accountstringbody

What comes back

FieldType
okAlways truetrue
Try itanswered in this tab
curl
curl -X POST "$SANDBOX/grok/account/disconnect" \
  -H "x-intentic-control: $INTENTIC_TOKEN" \
  -H "content-type: application/json" \
  -d '{"id":"a1b2c3d4"}'
TypeScript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.grok.disconnect({
  "id": "a1b2c3d4"
});

Type to search every page, in the docs and the API reference.