---
title: "Poll device code OAuth flow for completion"
method: POST
path: "/api/integrations/{provider}/device-auth/poll"
tags: ["v1", "integrations"]
---

# Poll device code OAuth flow for completion

`POST /api/integrations/{provider}/device-auth/poll`

## Path parameters

- `provider` string, required — Provider name for integrations. Can be any string value, including custom provider names.

## Request body

- DeviceAuthPollRequest
  - `state_token` string, required

## Response `200`

Successful Response

- DeviceAuthPollResponse
  - `status` 'pending' | 'slow_down' | 'approved' | 'denied' | 'expired', required
  - `credentials` CredentialsMetaResponse
    - `id` string, required
    - `provider` string, required
    - `type` 'api_key' | 'oauth2' | 'user_password' | 'host_scoped' | 'device_code', required
    - `title` string, nullable, required
    - `scopes` string[], nullable, required
    - `username` string, nullable, required
    - `host` string, nullable — Host pattern for host-scoped or MCP server URL for MCP credentials
    - `is_managed` boolean

## Other responses

- `401` — Authentication required
- `422` — Validation Error

---

[API](https://skmtc.net/significant-gravitas/apis/autogpt-agent-server.md) · [All operations](https://skmtc.net/significant-gravitas/apis/autogpt-agent-server/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/significant-gravitas/autogpt-agent-server/revisions/2f82328f5184/schema)
