# Look up a token operation

If the /oauth/token response was lost, send the same body here to find out what happened.

```http
POST https://larm.sa/oauth/operations/lookup
```

## Request body

| Field | Type | Required | Description |
|---|---|---|---|
| `grant_type` | object | yes | One of: `authorization_code`, `refresh_token`. |
| `code` | string | no |  |
| `redirect_uri` | string (uri) | no |  |
| `code_verifier` | string | no |  |
| `refresh_token` | string | no |  |


## Example request

```bash
curl -X POST "https://larm.sa/oauth/operations/lookup" \
  -u "$CLIENT_ID:$CLIENT_SECRET" \
  -H "Content-Type: application/json" \
  -d '{ "grant_type": "refresh_token", "refresh_token": "lar_rt_…" }'
```


## Example response (200)

```json
{
  "operation_id": "0e9d8c7b-6a5f-4e3d-2c1b-0a9f8e7d6c5b",
  "state": "completed",
  "result_available": false,
  "recovery": "revoke_issued_pair_then_reauthorize",
  "error_code": "RESULT_UNAVAILABLE_REAUTHORIZE"
}
```


## Errors

| HTTP | Code | Meaning |
|---|---|---|
| 404 | `OPERATION_NOT_FOUND` | No operation matches this body. |
