Skip to main content
GET
https://api.tktchurch.com/v1
/
auth
/
devices
curl -X GET "https://api.tktchurch.com/v1/auth/devices" \
  -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"
  }
]

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:
  • 401 Unauthorized: Missing or invalid access token
  • 401 Unauthorized: Token has expired
  • 500 Internal Server Error: Invalid user ID in token
curl -X GET "https://api.tktchurch.com/v1/auth/devices" \
  -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"
  }
]