myAuthStats
Requires an authenticated session.
Summarizes the signed-in user's last 100 sign-in events: successful and failed sign-ins, distinct devices and IP addresses, and the 10 most recent events.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
query MyAuthStats {
myAuthStats {
failedLogins
totalLogins
uniqueDevices
uniqueLocations
recentActivity {
id
createdAt
browser
device
errorMessage
event
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query MyAuthStats {\n myAuthStats {\n failedLogins\n totalLogins\n uniqueDevices\n uniqueLocations\n recentActivity {\n id\n createdAt\n browser\n device\n errorMessage\n event\n }\n }\n}"
}
EOF
Response:
{
"data": {
"myAuthStats": {
"failedLogins": 0,
"totalLogins": 0,
"uniqueDevices": 0,
"uniqueLocations": 0,
"recentActivity": [
{
"id": "id",
"createdAt": "2025-01-15T00:00:00Z",
"browser": "string",
"device": "string",
"errorMessage": "string",
"event": "ACCOUNT_LOCKED"
}
]
}
}
}
myAuthStats: AuthStats!
Type
AuthStats object
Sign in figures.