---
title: "Complete an OIDC device code flow for a pending credential binding"
method: POST
path: "/api/workspaces/{id}/credentials/{kind}/{bindingId}/device-complete"
tags: ["Misc"]
---

# Complete an OIDC device code flow for a pending credential binding

`POST /api/workspaces/{id}/credentials/{kind}/{bindingId}/device-complete`

Long-polls until the user authorizes the device code. Returns 201 with the created binding on success.

## Path parameters

- `id` string, required
- `kind` string, required
- `bindingId` string, required

## Response `201`

Binding created

- CredentialBindingCreateResponse
  - `auth_type` string
  - `display_name` string
  - `expires_in` integer
  - `id` string, required
  - `is_default` boolean
  - `server_url` string
  - `status` string
  - `user_code` string
  - `verification_uri` string

## Other responses

- `401` — unauthorized
- `403` — device code authorization failed
- `404` — no pending device code flow found
- `409` — duplicate display_name or flow already being completed
- `410` — device code flow expired
- `500` — internal error

## Changes

> 20 revisions in range; 1 could not be searched.

- **2026-05-22** `a533774946d2` — 1 info
  - endpoint added
- **2026-05-22** `1ba39f384b63` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/agentserver/apis/agentserver-api/changes/api/workspaces/:id/credentials/:kind/:bindingId/device-complete/post.md)

---

[API](https://skmtc.dev/agentserver/apis/agentserver-api.md) · [All operations](https://skmtc.dev/agentserver/apis/agentserver-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/agentserver/agentserver-api/revisions/e8c329825b4e/schema)
