---
title: "Initiate device authorization"
method: POST
path: "/oauth/device"
tags: ["oauth"]
---

# Initiate device authorization

`POST /oauth/device`

## Request body

- object — Initiate device authorization as per https://datatracker.ietf.org/doc/html/rfc8628#section-3.1
  - `client_id` string, required
  - `scope` string

## Response `200`

Details of the device code that was created as per https://datatracker.ietf.org/doc/html/rfc8628#section-3.2

- object
  - `device_code` string, required
  - `user_code` string, required
  - `verification_uri` string, required
  - `expires_in` number, required

---

[API](https://skmtc.net/huggingface/apis/hub-api-endpoints.md) · [All operations](https://skmtc.net/huggingface/apis/hub-api-endpoints/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/huggingface/hub-api-endpoints/versions/6ab9f7d9cfb5/schema)
