RUAL Documentation

Access Token Device Information

Access tokens now include detailed device information through the new .device property, providing better insights into how users access your application.

Migration from .agent

The .agent property has been deprecated and replaced with .device.

Device Properties

The .device object contains detailed information about the user's device, browser, and application:

Property Type Description
device_type string|null Type of device: "mobile", "desktop", "tablet", "server", or null
device_os string|null Operating system: "mac", "windows", "linux", "android", "ios", "chromeos", "other", or null
application string|null Application name (e.g., "chrome-mac", "safari-ios") or null
browser string|null Browser engine: "chrome", "firefox", "safari", "edge", "electron", or null
browser_version string|null Version of the browser engine (e.g., "120.0.0.0") or null
device_version string|null Operating system version (e.g., "10.15.7", "18.3.2") or null
is_mobile boolean true if the device is a mobile phone
is_tablet boolean true if the device is a tablet
is_desktop boolean true if the device is a desktop or laptop
is_bot boolean true if the request comes from a bot or crawler
is_ai boolean true if the bot is an AI assistant or training bot
ai_type string|null Type of AI bot: "crawl" (training/research) or "user" (user-initiated), or null

Desktop Browser Examples

Here are examples of device information for common desktop browsers:

Chrome on macOS

Chrome Desktop Device Info
{ "device_type": "desktop", "device_os": "mac", "application": "chrome-mac", "browser": "chrome", "browser_version": "140.0.0.0", "device_version": "10.15.7", "is_mobile": false, "is_tablet": false, "is_desktop": true, "is_bot": false, "is_ai": false, "ai_type": null }

Safari on macOS

Safari Desktop Device Info
{ "device_type": "desktop", "device_os": "mac", "application": "safari-mac", "browser": "safari", "browser_version": "17.0", "device_version": "10.15.7", "is_mobile": false, "is_tablet": false, "is_desktop": true, "is_bot": false, "is_ai": false, "ai_type": null }

Mobile Device Examples

Device information for mobile devices provides detailed insights into the user's mobile experience:

iPhone Safari

iPhone Device Info
{ "device_type": "mobile", "device_os": "ios", "application": "safari-ios", "browser": "safari", "device_version": "18.3.2", "is_mobile": true, "is_tablet": false, "is_desktop": false, "is_bot": false, "is_ai": false, "ai_type": null }

Android Chrome

Android Device Info
{ "device_type": "mobile", "device_os": "android", "application": "chrome-android", "browser": "chrome", "browser_version": "114.0.0.0", "device_version": "10", "is_mobile": true, "is_tablet": false, "is_desktop": false, "is_bot": false, "is_ai": false, "ai_type": null }

Tablet Examples

iPad

iPad Device Info
{ "device_type": "tablet", "device_os": "ios", "application": "safari-ios", "browser": "safari", "browser_version": "17.0", "device_version": "17.0", "is_mobile": false, "is_tablet": true, "is_desktop": false, "is_bot": false, "is_ai": false, "ai_type": null }

Bot and AI Examples

The device information can also identify various types of bots and AI assistants accessing your application:

Search Engine Bot

Google Bot Device Info
{ "device_type": "server", "device_os": null, "application": "googlebot", "browser": "googlebot", "is_mobile": false, "is_tablet": false, "is_desktop": false, "is_bot": true, "is_ai": false, "ai_type": null }

AI Assistant (User-Initiated)

ChatGPT User Device Info
{ "device_type": "server", "device_os": null, "application": "chatgpt-user", "browser": "chatgpt-user", "browser_version": "1.0", "is_mobile": false, "is_tablet": false, "is_desktop": false, "is_bot": true, "is_ai": true, "ai_type": "user" }