Devices by Email API
POST /getDevicesByEmail
Description
This API endpoint retrieves the list of
id: devices-by-email-api title: Devices by Email API sidebar_label: Devices by Email sidebar_position: 680
POST /getDevicesByEmail
Description
This endpoint retrieves the list of devices associated with a given email address.
Request
Endpoint: /getDevicesByEmail
Method: POST
Body:
query getDevicesByEmail($email: String!) {
getDevicesByEmail(email: $email) {
deviceAppType
deviceOsType
appVersion
lastConnectionStartTime
lastConnectionStopTime
isConnected
lastSessionId
isDeactivated
lastConnectedServerId
lastConnectedServerCountry
lastConnectedServerCity
}
}
GraphQL Variables:
{
"email": ""
}
Example Request
cURL:
curl --location 'YOUR_API_ENDPOINT' \
--header 'Content-Type: application/json' \
--data '{"query":"query getDevicesByEmail ($email: String!) {\n getDevicesByEmail (email: $email) {\n deviceAppType\n deviceOsType\n appVersion\n lastConnectionStartTime\n lastConnectionStopTime\n isConnected\n lastSessionId\n isDeactivated\n lastConnectedServerId\n lastConnectedServerCountry\n lastConnectedServerCity\n }\n}","variables":{"email":"user@example.com"}}'
Response
The response will include details about the devices associated with the provided email address, such as:
deviceAppType
: The type of application on the device.deviceOsType
: The operating system of the device.appVersion
: The version of the app on the device.lastConnectionStartTime
: The start time of the last connection.lastConnectionStopTime
: The stop time of the last connection.isConnected
: Indicates whether the device is currently connected.lastSessionId
: The ID of the last session.isDeactivated
: Indicates whether the device has been deactivated.lastConnectedServerId
: The ID of the last connected server.lastConnectedServerCountry
: The country of the last connected server.lastConnectedServerCity
: The city of the last connected server.
Errors
- 400 Bad Request: Invalid email format or missing email.
- 404 Not Found: No devices found for the provided email address.
- 500 Internal Server Error: Server error while processing the request.