> ## Documentation Index
> Fetch the complete documentation index at: https://docs.clawdot.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# errand_verify_user_bind

> MCP tool errand_verify_user_bind — verifies the code to complete errand authorization and mints a consent_grant_id

## errand\_verify\_user\_bind

Verifies the SMS code and establishes the user authorization, returning a `consent_grant_id`. This is the closing step of the errand authorization flow and only needs the Agent credential — it does not take a `consent_grant_id` parameter.

<Note>
  **Errand authorization flow (closing step)**: `errand_request_user_bind` → get `bind_id` → user receives the code → **`errand_verify_user_bind`** exchanges it for a `consent_grant_id` → subsequent errand tools carry that `consent_grant_id`.
</Note>

<Warning>
  **Errand's consent\_grant\_id is independent from delivery's**: the `consent_grant_id` minted here works only for errand tools — a delivery `consent_grant_id` cannot call errand tools. Only customers with cross-capability sharing enabled get one `consent_grant_id` that works for both errand and delivery (and revoking it then revokes both — see `revoked_scopes` on the `errand_revoke_user_bind` page). Re-binding the same phone number **rotates** the grant: a new `consent_grant_id` is issued and the old one is invalidated immediately.
</Warning>

### Parameters

| Parameter | Type   | Required | Default | Description                                                      |
| --------- | ------ | -------- | ------- | ---------------------------------------------------------------- |
| `bind_id` | string | Yes      | —       | Binding session ID, from the `errand_request_user_bind` response |
| `code`    | string | Yes      | —       | The SMS verification code entered by the user                    |

### Returns

| Field              | Type      | Description                                                            |
| ------------------ | --------- | ---------------------------------------------------------------------- |
| `bound`            | boolean   | Whether the authorization completed; `true` on success                 |
| `status`           | string    | `"success"` on success                                                 |
| `consent_grant_id` | string    | User consent grant ID, carried by all subsequent errand tool calls     |
| `scopes`           | string\[] | Authorization scope; `["dayoudan.errand"]` for errand                  |
| `expires_at`       | string    | Grant expiration time (ISO 8601, \~3 months); re-bind after it expires |

```json theme={null}
{
  "bound": true,
  "status": "success",
  "consent_grant_id": "cg_55fdaa2739314530a261f7af1d3ba3b7",
  "scopes": ["dayoudan.errand"],
  "expires_at": "2026-10-18T15:26:54+00:00"
}
```

### Error Codes

| code                             | Description                               |
| -------------------------------- | ----------------------------------------- |
| `AUTH_REQUIRED` / `AUTH_INVALID` | Missing or invalid Agent credential       |
| `SMS_CODE_INVALID`               | Verification code is wrong or has expired |
| `BINDING_LIMIT_REACHED`          | This Agent has reached its binding quota  |

See [Error Handling](/en/gateway/error-handling) for the full list.

**Typical latency**: \~0.5s.

### Call Example

```json theme={null}
{ "name": "errand_verify_user_bind", "arguments": { "bind_id": "<bind_id>", "code": "123456" } }
```
