> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended**:
> ```bash
> npx @scalekit-inc/cli setup
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for other Agent Skills-compatible agents.
> Skills: integrate-agentkit, implement-saaskit, add-mcp-oauth, implement-sso, implement-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Verify the user

`POST /api/v1/connected_accounts/user/verify`

Confirms that the user who just authorized a connection is the user your app meant, then makes their connected account `ACTIVE`. When your environment verifies users with a custom verifier, Scalekit sends the user to your `user_verify_url` after they approve access, with an `auth_request_id` query parameter. Call this endpoint from your server with that `auth_request_id` and the identifier of the user signed in to your app, then send the user to `post_user_verify_redirect_url`. If the identifier doesn't match the one the [authorization link](https://docs.scalekit.com/agentkit/reference/authorization/get-an-authorization-link/) was created for, the call returns `403` and the account stays `PENDING_VERIFICATION`.

**Request body**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `auth_request_id` | string | Yes | The `auth_request_id` query parameter from the request Scalekit sent to your `user_verify_url`. Pass it as it is. |
| `identifier` | string | Yes | Your app's ID for the user, the same value you used when the user connected. Use a stable internal ID, not an email address. |

**Response (200)**

| Name | Type | Description |
| --- | --- | --- |
| `post_user_verify_redirect_url` | string | Where to send the user next, to finish connecting. |

**Errors**

- `400`: Invalid request - missing or malformed fields
- `401`: Unauthorized - invalid or missing access token
- `403`: Forbidden - identifier mismatch
- `404`: Not found - no pending flow for the given auth_request_id or already consumed

**Request**

```bash
curl -sS -X POST \
  "$SCALEKIT_ENVIRONMENT_URL/api/v1/connected_accounts/user/verify" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "auth_request_id": "[AUTH REQUEST ID]",
    "identifier": "user_123"
  }'
```

**Response**

```json
{
  "post_user_verify_redirect_url": "https://env1.example.com/connect/success"
}
```

**Python SDK:** `scalekit_client.actions.verify_connected_account_user`

Confirms the user who authorized is the user your app meant.

```python
scalekit_client.actions.verify_connected_account_user(
    auth_request_id: str,
    identifier: str,
) -> VerifyConnectedAccountUserResponse
```

Example:

```python
result = scalekit_client.actions.verify_connected_account_user(
    auth_request_id="[AUTH REQUEST ID]",
    identifier="user_123",
)
```

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `auth_request_id` | `str` | Yes | The `auth_request_id` query parameter from the request Scalekit sent to your `user_verify_url`. Pass it as it is. |
| `identifier` | `str` | Yes | Your app's ID for the user, the same value you used when the user connected. Use a stable internal ID, not an email address. |

Returns `VerifyConnectedAccountUserResponse`: The `post_user_verify_redirect_url` to send the user to.

**Node.js SDK:** `scalekit.actions.verifyConnectedAccountUser`

Confirms the user who authorized is the user your app meant. Call it from your server when Scalekit sends the user to your `userVerifyUrl`, with the `authRequestId` from that request and the identifier of the user signed in to your app. The connected account becomes `ACTIVE`.

```ts
scalekit.actions.verifyConnectedAccountUser(
  params: {
    authRequestId: string;
    identifier: string;
  },
): Promise<VerifyConnectedAccountUserResponse>
```

Example:

```ts
const result = await scalekit.actions.verifyConnectedAccountUser({
  authRequestId: "[AUTH REQUEST ID]",
  identifier: "user_123",
});
```

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `authRequestId` | `string` | Yes | The `auth_request_id` query parameter from the request Scalekit sent to your `user_verify_url`. Pass it as it is. |
| `identifier` | `string` | Yes | Your app's ID for the user, the same value you used when the user connected. Use a stable internal ID, not an email address. |

Returns `Promise<VerifyConnectedAccountUserResponse>`.

**Used in**

- [Build a multi-user GitHub PR summarizer agent](https://docs.scalekit.com/cookbooks/render-github-pr-summarizer/)
- [FastRouter + Scalekit tool calling](https://docs.scalekit.com/cookbooks/fastrouter-agentkit-tool-calling/)
- [Verify users](https://docs.scalekit.com/agentkit/user-verification/)


Part of [Authorization](https://docs.scalekit.com/agentkit/reference/authorization/) in the [AgentKit API reference](https://docs.scalekit.com/agentkit/reference/). Authentication: https://docs.scalekit.com/agentkit/reference/authentication.md. Errors and rate limits: https://docs.scalekit.com/agentkit/reference/errors.md. Pagination: https://docs.scalekit.com/agentkit/reference/pagination.md


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
