Devices

List Authorized Devices

get

Gets a list of active OAuth2 authorized devices belonging to a user.

Args: offset: Offset for pagination. limit: Limit for pagination. user: The authorized user. user_manager: The user manager.

Returns: List of OAuth2 authorized device objects.

Authorizations
OAuth2clientCredentialsRequired
Token URL: Refresh URL:

OAuth2authorizationCodeRequired
Authorization URL: Token URL: Refresh URL:
Query parameters
offsetintegerOptionalDefault: 0
limitintegerOptionalDefault: 100
Responses
200

Successful Response

application/json
get
/devices
GET /devices HTTP/1.1
Host: 
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "text",
    "created": "2025-12-07T23:38:07.629Z",
    "updated": "2025-12-07T23:38:07.629Z",
    "user_id": "123e4567-e89b-12d3-a456-426614174000",
    "client_id": "123e4567-e89b-12d3-a456-426614174000",
    "expires": "2025-12-07T23:38:07.629Z",
    "trusted_device": true,
    "status": "pending",
    "os": "text",
    "ip_address": "text",
    "hostname": "text",
    "city": "text",
    "region": "text",
    "country": "text",
    "last_login": "2025-12-07T23:38:07.629Z",
    "device_metadata": {}
  }
]

Get Authorization Device

get

Gets a specific OAuth2 authorized device using its unique ID.

Args: device_id_or_user_code: The ID or user code of the OAuth2 authorized device to get. user: The authorized user. user_manager: The user manager.

Returns: A specific OAuth2 authorized device object.

Raises: OAuthDeviceNotFound: If the device with the given ID does not exist, does not belong to the current user or could not be verified using the given user code.

Authorizations
OAuth2clientCredentialsRequired
Token URL: Refresh URL:

OAuth2authorizationCodeRequired
Authorization URL: Token URL: Refresh URL:
Path parameters
device_id_or_user_codestringRequired
Responses
200

Successful Response

application/json
get
/devices/{device_id_or_user_code}
GET /devices/{device_id_or_user_code} HTTP/1.1
Host: 
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "text",
  "created": "2025-12-07T23:38:07.629Z",
  "updated": "2025-12-07T23:38:07.629Z",
  "user_id": "123e4567-e89b-12d3-a456-426614174000",
  "client_id": "123e4567-e89b-12d3-a456-426614174000",
  "expires": "2025-12-07T23:38:07.629Z",
  "trusted_device": true,
  "status": "pending",
  "os": "text",
  "ip_address": "text",
  "hostname": "text",
  "city": "text",
  "region": "text",
  "country": "text",
  "last_login": "2025-12-07T23:38:07.629Z",
  "device_metadata": {}
}

Update Authorized Device

put

Updates a specific OAuth2 authorized device using its unique ID.

Args: device_id: The ID of the OAuth2 authorized device to update. update: The model containing the attributes to update. user: The authorized user. user_manager: The user manager.

Returns: The updated OAuth2 authorized device object.

Raises: OAuthDeviceNotFound: If the device with the given ID does not exist or does not belong to the current user.

Authorizations
OAuth2clientCredentialsRequired
Token URL: Refresh URL:

OAuth2authorizationCodeRequired
Authorization URL: Token URL: Refresh URL:
Path parameters
device_idstring · uuidRequired
Body

OAuth2 device update model.

nameany ofOptional

The new name of the OAuth2 device.

stringOptional
or
nullOptional
device_metadataany ofOptional

The new metadata of the OAuth2 device.

objectOptional
or
nullOptional
Responses
200

Successful Response

application/json
put
/devices/{device_id}
PUT /devices/{device_id} HTTP/1.1
Host: 
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 36

{
  "name": "text",
  "device_metadata": {}
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "text",
  "created": "2025-12-07T23:38:07.629Z",
  "updated": "2025-12-07T23:38:07.629Z",
  "user_id": "123e4567-e89b-12d3-a456-426614174000",
  "client_id": "123e4567-e89b-12d3-a456-426614174000",
  "expires": "2025-12-07T23:38:07.629Z",
  "trusted_device": true,
  "status": "pending",
  "os": "text",
  "ip_address": "text",
  "hostname": "text",
  "city": "text",
  "region": "text",
  "country": "text",
  "last_login": "2025-12-07T23:38:07.629Z",
  "device_metadata": {}
}

Delete Authorized Device

delete

Deletes a specific OAuth2 authorized device using its unique ID.

Args: device_id: The ID of the OAuth2 authorized device to delete. user: The authorized user. user_manager: The user manager.

Raises: OAuthDeviceNotFound: If the device with the given ID does not exist or does not belong to the current user.

Authorizations
OAuth2clientCredentialsRequired
Token URL: Refresh URL:

OAuth2authorizationCodeRequired
Authorization URL: Token URL: Refresh URL:
Path parameters
device_idstring · uuidRequired
Responses
200

Successful Response

application/json
Responseany
delete
/devices/{device_id}
DELETE /devices/{device_id} HTTP/1.1
Host: 
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*

No content

Last updated

Was this helpful?