Hermes API
Device auth
Device authorization flow for CLI sign-in and token polling.
Functions
device_auth_pollPOST /v1/auth/device/pollcurl -sS -X POST "https://api.hermes-api.dev/v1/auth/device/poll" \
-H "Content-Type: application/json" \
-d '{
"device_code": "string"
}'device_auth_startPOST /v1/auth/device/startcurl -sS -X POST "https://api.hermes-api.dev/v1/auth/device/start"
Types
Request and response shapes pulled directly from the OpenAPI schema.
DeviceAuthPollRequest
export type DeviceAuthPollRequest = {
device_code: string;
};DeviceAuthPollResponse
export type DeviceAuthPollResponse = {
access_token?: string | null;
status: DeviceAuthStatus;
};DeviceAuthStartResponse
export type DeviceAuthStartResponse = {
device_code: string;
expires_in: number;
interval: number;
user_code: string;
verification_uri: string;
verification_uri_complete: string;
};DeviceAuthStatus
export type DeviceAuthStatus = "pending" | "authorized" | "consumed" | "expired";