Blockstream Enterprise
ReferenceAPI ReferenceUsers

Get User Devices Users

Get User Devices Users.

Request

UsersGetUserDevicesRequest
interface UsersGetUserDevicesRequest {
  action: 'get'
  resource: string
}

Prop

Type

Response

UsersGetUserDevicesResponse_success
interface UsersGetUserDevicesResponse_success {
  status: 'success'
  error_code?: '-1' | '-2' | '-3' | '-4' | '-5' | '-6' | '-7' | '-8' | '-9' | '-10' | '-11' | '-12' | '-13' | undefined
  message?: string | undefined
  details: {
    devices: {
      id: string
      user_id: string
      ecdsa_pubkey: string
      rsa_pubkey: string
      label: string
      created_at: string
      updated_at: string
      is_active: boolean
      last_access_at: string
    } []
  }
  metadata: unknown
}

Prop

Type

UsersGetUserDevicesResponse_failed | pending | unauthorized | rejected
interface UsersGetUserDevicesResponse_failed | pending | unauthorized | rejected {
  status: 'failed' | 'pending' | 'unauthorized' | 'rejected'
  error_code?: '-1' | '-2' | '-3' | '-4' | '-5' | '-6' | '-7' | '-8' | '-9' | '-10' | '-11' | '-12' | '-13' | undefined
  message?: string | undefined
}

Prop

Type

Example

Example
import { resourceSchema } from '@blockstream/ecs-js-sdk'
import { broadcastRequest } from './broadcaster'

const response = await broadcastRequest<
  typeof resourceSchema.shape.users.shape.get-user-devices
>(
  {
    action: 'get',
    resource: '/users/{id}/devices',
  },
  blockstream,
)

On this page