Skip to main content
GET
/
devices
/
users
/
{userId}
curl -X GET "https://api.tktchurch.com/v1/auth/devices/users/123e4567-e89b-12d3-a456-426614174000" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "deviceInfo": {
      "deviceId": "device123",
      "deviceType": "mobile",
      "deviceName": "iPhone 13",
      "deviceModel": "iPhone13,2",
      "osName": "iOS",
      "osVersion": "16.0",
      "appVersion": "1.0.0",
      "ipAddress": "192.168.1.1",
      "userAgent": "Mozilla/5.0...",
      "lastLocation": "New York, US"
    },
    "lastUsedAt": "2024-01-20T08:30:00Z",
    "createdAt": "2024-01-01T00:00:00Z",
    "expiresAt": "2024-02-01T00:00:00Z"
  }
]
This endpoint requires authentication and the viewUserDevices permission.

Path Parameters

userId
string
required
The UUID of the user whose devices to list

Response

Returns an array of active devices. Each device represents a refresh token and its associated access token.
id
string
Unique identifier for the token (UUID)
deviceInfo
object
Information about the device
lastUsedAt
string
Timestamp when the token was last used
createdAt
string
Timestamp when the token was created
expiresAt
string
Timestamp when the token expires

Error Responses

error
object
Error details when the request fails
Common error cases:
  • 400 Bad Request: Invalid user ID format
  • 401 Unauthorized: Missing or invalid access token
  • 403 Forbidden: Insufficient permissions (missing viewUserDevices)
  • 404 Not Found: User not found
curl -X GET "https://api.tktchurch.com/v1/auth/devices/users/123e4567-e89b-12d3-a456-426614174000" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "deviceInfo": {
      "deviceId": "device123",
      "deviceType": "mobile",
      "deviceName": "iPhone 13",
      "deviceModel": "iPhone13,2",
      "osName": "iOS",
      "osVersion": "16.0",
      "appVersion": "1.0.0",
      "ipAddress": "192.168.1.1",
      "userAgent": "Mozilla/5.0...",
      "lastLocation": "New York, US"
    },
    "lastUsedAt": "2024-01-20T08:30:00Z",
    "createdAt": "2024-01-01T00:00:00Z",
    "expiresAt": "2024-02-01T00:00:00Z"
  }
]