Get login attempts
GET
/api/mfa/login-attempts
const url = 'http://localhost:3001/api/mfa/login-attempts';const options = {method: 'GET', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://localhost:3001/api/mfa/login-attempts \ --header 'Authorization: <Authorization>'Retrieve recent login attempts for the authenticated user
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”OK
Media typeapplication/json
object
attempts
Array<object>
object
created_at
string
failure_reason
string
ip_address
string
success
boolean
user_agent
string
success
boolean
total
integer
Examplegenerated
{ "attempts": [ { "created_at": "example", "failure_reason": "example", "ip_address": "example", "success": true, "user_agent": "example" } ], "success": true, "total": 1}Unauthorized
Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{ "error": "example", "success": true}Internal Server Error
Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{ "error": "example", "success": true}