---
title: "Grok accounts · intentic sandbox API"
description: "Connecting an xAI subscription, and the account already connected. Every route in the grok accounts group of the intentic sandbox API, with its input, its answer and a playground."
url: "https://intentic.dev/api/grok/"
---

Models and accounts

# Grok accounts

Connecting an xAI subscription, and the account already connected

**On this page (3 sections)**

- [Begin connecting a Grok account](#grok-start)
- [Connected Grok account](#grok-accounts)
- [Disconnect the Grok account](#grok-disconnect)

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/start` Begin 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 |
| --- | --- |
| `url` The page to open, which already… | string |
| `code` The one-time code, shown as well… | string |

Try it answered in this tab

curl

```bash
curl -X POST "$SANDBOX/grok/oauth/start" \
 -H "x-intentic-control: $INTENTIC_TOKEN"
```

TypeScript

```typescript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.grok.start();
```

**GET`/grok/accounts` Connected 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 |
| --- | --- |
| `accounts` The connected accounts | object[] |
| `id` The account's id, which is what… | string |
| `label` What it is called here, which… | string |
| `email` Who it signs in as, in… | string |
| `organization` Which organisation it belongs to, where… | string |
| `scope` What the credential is permitted to… | string |
| `connectedAt` When it was connected, in milliseconds | number |
| `needsReauth` Its stored credential can no longer… | boolean |
| `detail` Why, in words a person can… | string |
| `usage` How full its plan limits were… | object |
| `windows` | object[] |
| `kind` | string |
| `label` | string |
| `utilization` | number |
| `resetsAt` | number |
| `measuredAt` | number |

Try it answered in this tab

curl

```bash
curl "$SANDBOX/grok/accounts" \
 -H "x-intentic-control: $INTENTIC_TOKEN"
```

TypeScript

```typescript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.grok.accounts();
```

**POST`/grok/account/disconnect` Disconnect the Grok account**

Clears the stored tokens.

### What you send

| Field | Type | Where |
| --- | --- | --- |
| `id` required Which account | string | body |

### What comes back

| Field | Type |
| --- | --- |
| `ok` Always true | true |

Try it answered in this tab

curl

```bash
curl -X POST "$SANDBOX/grok/account/disconnect" \
 -H "x-intentic-control: $INTENTIC_TOKEN" \
 -H "content-type: application/json" \
 -d '{"id":"a1b2c3d4"}'
```

TypeScript

```typescript
import { sandbox } from "@intentic/sandbox-client";

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

More in Models and accounts

[Previous ← Claude accounts](https://intentic.dev/api/claude/)[Next Cursor accounts →](https://intentic.dev/api/cursor/)
