Logout Device API
End a device session and disconnect the device from VPN services
Logout Device API
Terminate device sessions gracefully. Ends the authenticated session and disconnects the device from VPN services while keeping it registered.
Graceful Logout
Properly terminate sessions with cleanup.
Session Security
Invalidate session tokens immediately.
Device Retained
Device stays registered for future logins.
Endpoint Overview
/graphqlLog out a device by ending its current session. The device remains activated but can no longer connect until it logs in again.
Request Parameters
userIdInt!RequiredThe unique identifier of the user whose device is logging out.
deviceIdInputDeviceIdInput!RequiredObject containing the device identification details.
GraphQL Mutation
mutation logoutDevice($userId: Int!, $deviceIdInput: DeviceIdInput!) {
logoutDevice(userId: $userId, deviceIdInput: $deviceIdInput)
}Variables:
{
"userId": 12345,
"deviceIdInput": {
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"serial": "ABC123XYZ789",
"name": "John's iPhone 15"
}
}HTTP Request:
curl -X POST https://api.orbnet.com/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-d '{
"query": "mutation logoutDevice($userId: Int!, $deviceIdInput: DeviceIdInput!) { logoutDevice(userId: $userId, deviceIdInput: $deviceIdInput) }",
"variables": {
"userId": 12345,
"deviceIdInput": {
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"serial": "ABC123XYZ789",
"name": "Johns iPhone 15"
}
}
}'Response
{
"data": {
"logoutDevice": true
}
}{
"errors": [
{
"message": "No active session found for this device",
"path": ["logoutDevice"],
"extensions": {
"code": "SESSION_NOT_FOUND"
}
}
],
"data": null
}Logout vs Deactivate
Logout
Ends current session. Device remains registered and can log in again.
Deactivate
Removes device from account. Must be re-activated to use again.
Use Cases
User-Initiated
User logs out from app to end their session.
Security Logout
Force logout after password change or security concern.
Session Rotation
Logout and re-login to refresh session tokens.
Troubleshooting
Clear session state to resolve connection issues.
Related Endpoints
Keep Device Active
Logout is the preferred method when users want to temporarily stop VPN access. The device stays registered and can quickly reconnect without re-activation.
Need Complete Device Removal?
To fully remove a device from a user's account, use the Deactivate Device API instead.