identity-svc

Device authorization grant: pedir código de dispositivo (RFC 8628 §3.1)

Anónimo, con límite por IP y tope global de pendientes. Devuelve device_code (secreto del dispositivo), user_code de 8 dígitos y la página de verificación de la web. Acepta application/x-www-form-urlencoded y JSON. Errores en formato OAuth.

POST
/auth/device/code

Anónimo, con límite por IP y tope global de pendientes. Devuelve device_code (secreto del dispositivo), user_code de 8 dígitos y la página de verificación de la web. Acepta application/x-www-form-urlencoded y JSON. Errores en formato OAuth.

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

client_id*string
Length1 <= length <= 64
device_kind?string

Value in

  • "cli"
  • "tv"
  • "native"
device_name*string
Match^[^\u0000-\u001f\u007f-\u009f]+$
Length1 <= length <= 64
scope?string
Lengthlength <= 1024

Response Body

application/json

application/json

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/auth/device/code" \  -H "Content-Type: application/json" \  -d '{    "client_id": "string",    "device_name": "string"  }'
{  "device_code": "string",  "expires_in": 1,  "interval": 1,  "user_code": "string",  "verification_uri": "string",  "verification_uri_complete": "string"}