Status endpoint
After a registration or authentication operation, poll this endpoint to verify the status of the original operation. Status polling is applicable only to operations when the channel is app, push, or fido2.
HTTP request
POST https://{instance}.mauth.nevis.cloud/api/v1/status
Request body parameters
| Parameter | Type | Required/Optional | Description |
|---|---|---|---|
statusToken | string | required | The status token as retrieved during registration or approval. |
Example HTTP request
- cURL
- Python 3
Code sample for status polling
# Set $statusToken
curl "https://$instance.mauth.nevis.cloud/api/v1/status" \
-XPOST \
-H 'Content-Type: application/json' \
-d "{ \"statusToken\": \"$statusToken\" }"
Code sample for status polling
data = {'statusToken': 'eyJhb...lc3g'}
resp = requests.post(f'https://{instance}.mauth.nevis.cloud/api/v1/status', json = data)
print(resp.json())
HTTP response
A transaction can have one of the following statuses:
pending: The transaction is still pending because the user did not react to the push notification yet.succeeded: The transaction was successful.failed: The transaction failed, either by timeout or because the user did not accept.unknown: Unknown transaction.
| Field | Type | Description |
|---|---|---|
transactionId | UUID | The unique identifier of the operation. |
status | enum | The status of the transaction. The status can be pending, succeeded, failed, or unknown. |
userId | UUID | Represents the user that is the subject of the transaction. In case of usernameless authentication, the userId is only present when the status is succeeded. |
username | string | The username that the user was registered with. In case of usernameless authentication, the username is only present when the status is succeeded. |
token | string | A consumable transaction token that contains the verifiable result of the current status. For more information, see Token introspection endpoint. |
createdAt | string | The date when the registration or approval was started. |
lastUpdatedAt | string | The date when the registration or approval was last updated. |
Example HTTP response
- Status is pending
- Status is succeeded
- Status is failed
- Status is unknown
200 OK: Pending - The operation is still waiting for confirmation by the user
{
"transactionId": "b7d44592-91f3-4f4b-9e37-202a3061edc3",
"status": "pending",
"userId": "7e16ba00-92e2-4fcb-b30e-1af8fdc843aa",
"username": "Userxyz123",
"token": "eyJhb...Fl9bpEXGGw",
"createdAt": "2020-10-09T12:52:48Z",
"lastUpdatedAt": "2020-10-09T12:52:48Z"
}
200 OK: Succeeded - The operation was successfully confirmed by the user
{
"transactionId": "b7d44592-91f3-4f4b-9e37-202a3061edc3",
"status": "succeeded",
"userId": "7e16ba00-92e2-4fcb-b30e-1af8fdc843aa",
"username": "Userxyz123",
"token": "eyJhb...Fl9bpEXGGw",
"createdAt": "2020-10-09T12:52:48Z",
"lastUpdatedAt": "2020-10-09T12:52:48Z"
}
412 Precondition Failed: The transaction was aborted or timed out
{
"transactionId": "b7d44592-91f3-4f4b-9e37-202a3061edc3",
"status": "failed",
"userId": "7e16ba00-92e2-4fcb-b30e-1af8fdc843aa",
"username": "Userxyz123",
"token": "eyJhb...Fl9bpEXGGw",
"createdAt": "2020-10-09T12:52:48Z",
"lastUpdatedAt": "2020-10-09T12:52:48Z"
}
404 Not Found: The provided status token is not known
{
"status": "unknown"
}