Device Management & Sessions
List active device sessions, sign out a specific device, resolve the device limit during login, refresh subscription claims, and verify email.
Device Management & Sessions
Every OrbVPN subscription allows a fixed number of simultaneous devices. OrbNET tracks each signed-in device as a session and exposes a small set of endpoints so users can see exactly what is connected, remotely sign out a lost or unknown device, and free up a slot when they hit their plan's device limit during login. This page also covers two adjacent session utilities: refreshing JWT claims after a subscription change, and verifying a user's email.
Device-Aware Sessions
A "device" here is a logged-in session keyed by a device_id your client supplies at login. Listing, naming, and revoking devices all operate on that identifier. Revoking a device immediately invalidates its tokens and pushes a force-logout notification to that device over WebSocket and FCM.
List Active Devices
/api/v1/auth/devicesReturn all active device sessions for the authenticated user, the device making the request, and the plan's device allowance.
Code Examples
curl https://api.orbai.world/api/v1/auth/devices \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."Response
{
"success": true,
"data": {
"devices": [
{
"device_id": "550e8400-e29b-41d4-a716-446655440000",
"device_name": "iPhone 15 Pro",
"platform": "ios",
"app_version": "3.4.0",
"login_date": "2026-06-20T08:14:00Z",
"last_active": "2026-06-26T11:02:00Z",
"is_current": true
},
{
"device_id": "9b2f7c10-44ad-4f0e-bb71-2c0f8e91d3aa",
"device_name": "Pixel 8 Pro",
"platform": "android",
"app_version": "3.4.0",
"login_date": "2026-06-18T19:40:00Z",
"last_active": "2026-06-25T07:55:00Z",
"is_current": false
}
],
"current_devices": 2,
"max_devices": 5
}
}Field Notes
current_devices is the number of active sessions; max_devices is the limit granted by the user's subscription plan (it varies per plan and defaults to 1 when no plan is found). device_name, platform, and app_version come from the values your client sent at login.
Sign Out a Specific Device
/api/v1/auth/logout-deviceRemotely sign out one device by its device_id. The target device receives an immediate force-logout over WebSocket and push notification.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
device_id | string | Required | The device_id of the session to revoke, as returned by GET /auth/devices. Maximum 255 characters. |
Code Examples
curl -X POST https://api.orbai.world/api/v1/auth/logout-device \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
-H "Content-Type: application/json" \
-d '{ "device_id": "9b2f7c10-44ad-4f0e-bb71-2c0f8e91d3aa" }'Responses
{
"success": true,
"data": {
"success": true,
"message": "Device logged out successfully",
"device_id": "9b2f7c10-44ad-4f0e-bb71-2c0f8e91d3aa",
"device_name": "Pixel 8 Pro"
}
}{
"success": false,
"error": {
"code": "DEVICE_NOT_FOUND",
"message": "The specified device was not found or is already logged out."
}
}Resolve the Device Limit During Login
When a user tries to sign in but has already reached their plan's device limit, the login response returns DEVICE_LIMIT_EXCEEDED along with the list of active devices and a short-lived device_logout_token. The user can then free a slot by signing out one of their existing devices without being authenticated — the device_logout_token authorizes the action.
/api/v1/auth/device-limit/logoutSign out a device using a short-lived device_logout_token issued by a DEVICE_LIMIT_EXCEEDED login response. No bearer token required.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
device_logout_token | string | Required | The short-lived token returned in the device_logout_token field of a DEVICE_LIMIT_EXCEEDED login response. Expires after a few minutes. |
device_id | string | Required | The device_id to sign out, chosen from the active_devices array of the login response. Maximum 255 characters. |
Code Examples
curl -X POST https://api.orbai.world/api/v1/auth/device-limit/logout \
-H "Content-Type: application/json" \
-d '{
"device_logout_token": "dlt_3f9a...",
"device_id": "9b2f7c10-44ad-4f0e-bb71-2c0f8e91d3aa"
}'Responses
{
"success": true,
"data": {
"success": true,
"message": "Device logged out successfully",
"device_id": "9b2f7c10-44ad-4f0e-bb71-2c0f8e91d3aa",
"device_name": "Pixel 8 Pro"
}
}{
"success": false,
"error": {
"code": "INVALID_TOKEN",
"message": "The device logout token is invalid or expired."
}
}Typical Flow
- User submits credentials to
POST /auth/login. 2. Login returnsDEVICE_LIMIT_EXCEEDEDwithactive_devicesand adevice_logout_token. 3. Your UI lists the devices and lets the user pick one to remove. 4. Call this endpoint with the token and chosendevice_id. 5. Retry the original login — a slot is now free.
Refresh Subscription Claims
After a user upgrades, renews, or changes their subscription, their existing access token still carries the old plan claims until it expires. Rather than forcing a full re-login, call refresh-claims to mint a fresh access token that reflects the latest subscription state.
/api/v1/auth/refresh-claimsIssue a new access token with up-to-date subscription claims for the authenticated user, without requiring a re-login.
Code Examples
curl -X POST https://api.orbai.world/api/v1/auth/refresh-claims \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."Response
{
"success": true,
"data": {
"access_token": "eyJhbGciOiJIUzI1NiIs...",
"refresh_token": "bmV3IHJlZnJlc2ggdG9rZW4...",
"access_token_expires_at": "2026-06-26T12:00:00Z",
"refresh_token_expires_at": "2026-07-26T12:00:00Z",
"token_type": "Bearer"
}
}When to Use refresh-claims vs. refresh
Use /auth/refresh to rotate an expiring token pair with the same claims. Use /auth/refresh-claims specifically after a subscription change so the new token reflects the upgraded plan, device limit, or feature entitlements immediately.
Verify Email
/api/v1/auth/verify-emailConfirm a user's email address using the verification token delivered in the verification email.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
token | string | Required | The email verification token from the link in the verification email. Single-use and time-limited. |
Code Examples
curl -X POST https://api.orbai.world/api/v1/auth/verify-email \
-H "Content-Type: application/json" \
-d '{ "token": "evt_a1b2c3d4..." }'Responses
{
"success": true,
"data": {
"success": true,
"message": "Email verified successfully"
}
}{
"success": false,
"error": {
"code": "INVALID_TOKEN",
"message": "This verification token is invalid, has expired, or has already been used."
}
}{
"success": false,
"error": {
"code": "EMAIL_ALREADY_VERIFIED",
"message": "This email address is already verified."
}
}Related Endpoints
- Login -- Email/password authentication (returns DEVICE_LIMIT_EXCEEDED when full)
- Logout -- End the current session or all sessions
- Refresh Token -- Rotate an expiring token pair
- Password Reset & Change -- Recover or change credentials