Get the caller's newest open challenge
GET
/mfa/attempts/last
const url = 'https://work.optidata.cloud/api/mfa/attempts/last';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://work.optidata.cloud/api/mfa/attempts/last \ --header 'Authorization: Bearer <token>'The most recent challenge of the calling user that is still pending and
was opened within the last hour. Returns 404 when there is none.
Authorizations
Section titled “Authorizations”Responses
Section titled “ Responses ”The open challenge.
Media typeapplication/json
A challenge waiting to be confirmed from a registered device.
object
id
integer format: int64
identifier
Public identifier of the request, used in paths.
string
user_id
integer format: int64
mfa_device_id
integer | null format: int64
status
string
ip
string | null
user_agent
string | null
app_id
integer | null
created_at
string format: date-time
Example
{ "status": "pending"}Missing, malformed or expired authentication key.
Media typeapplication/json
Authentication failures use an error key rather than message.
object
error
required
string
Examples
Examplemissing
No bearer token sent
{ "error": "JWT passport exception: Missing bearer token in request"}The resource does not exist, or does not belong to the given drive.
Media typeapplication/json
Generic error envelope used by policy, binding and framework failures.
object
message
required
Human-readable description of the failure.
string
Examples
Examplemissing
{ "message": "No query results for model [App\\Models\\Node] 99999999"}Rate limit exceeded. Retry after the window resets.
Media typeapplication/json
Generic error envelope used by policy, binding and framework failures.
object
message
required
Human-readable description of the failure.
string
Examples
Examplethrottled
{ "message": "Too Many Attempts."}