Read pairing status (for dashboard polling)
Polled by the dashboard while the user runs the helper. status is the outcome of the redeem, read in this order: connected — the redeem created or reconnected a credential, and credentialId names it; failed — a redeem spent the token and ended without a credential (a refusal or a server error), so a new pairing must be minted; expired — no credential, no failure recorded, and the TTL has elapsed; pending otherwise. A redeem in flight reads pending, and one still running when the TTL elapses reads expired until it records its outcome. The plaintext token is never re-served — only status + timestamps. Permission: model-provider-credentials:write or model-provider-credentials:connect; only the member who minted the pairing can read it — another member's answers 404.
/api/model-providers-oauth/pairing/{id}Cookie session from Better Auth. Requires X-Org-Id header for org-scoped routes.
In: cookie
Path Parameters
^pair_[A-Za-z0-9_-]+$Header Parameters
Organization ID. Required for cookie auth. Not needed for API key auth (org resolved from key).
uuidcurl -X GET "https://your-instance/api/model-providers-oauth/pairing/string"{
"id": "string",
"status": "pending",
"consumed_at": "2019-08-24T14:15:22Z",
"expiresAt": "2019-08-24T14:15:22Z",
"credentialId": "f568fec0-10b6-4b94-9daf-e62c50c9bf3e"
}{
"type": "https://docs.appstrate.dev/errors/validation-failed",
"title": "Validation Failed",
"status": 400,
"detail": "name: Invalid input: expected string, received undefined (+2 more)",
"code": "validation_failed",
"request_id": "req_abc123",
"errors": [
{
"field": "name",
"code": "required",
"message": "Invalid input: expected string, received undefined"
},
{
"field": "email",
"code": "invalid_format",
"message": "Invalid email address"
},
{
"field": "age",
"code": "invalid_type",
"message": "Invalid input: expected number, received string"
}
]
}{
"type": "https://docs.appstrate.dev/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "Invalid or missing session",
"code": "unauthorized",
"request_id": "req_abc123"
}{
"type": "https://docs.appstrate.dev/errors/forbidden",
"title": "Forbidden",
"status": 403,
"detail": "Insufficient permissions",
"code": "forbidden",
"request_id": "req_abc123"
}{
"type": "https://docs.appstrate.dev/errors/not-found",
"title": "Not Found",
"status": 404,
"detail": "Resource not found",
"code": "not_found",
"request_id": "req_abc123"
}