REST ClientMFA

verify

View as MarkdownOpen in Claude

Verify an MFA code submitted by the user.

Path parameters

mfa_request_idstringRequiredformat: "uuid"
The MFA request ID.

Request

tokenstringRequired
The token to verify.

Response

successbooleanRequired
Whether the token was successfully verified by the API. When `max_attempts` are reached or the request is no longer valid, the endpoint will return a `404 Not Found`.

Response Example

Response
{
"success": true
}

Example

from signalwire.rest import RestClient
client = RestClient(
project="your-project-id",
token="your-api-token",
host="your-space.signalwire.com",
)
result = client.mfa.verify("your-mfa-request-id", token="123456")
if result.get("success"):
print("Verification successful")
else:
print("Invalid code")