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
1{
2 "success": true
3}

Example

1from signalwire.rest import RestClient
2
3client = RestClient(
4 project="your-project-id",
5 token="your-api-token",
6 host="your-space.signalwire.com",
7)
8
9result = client.mfa.verify("your-mfa-request-id", token="123456")
10if result.get("success"):
11 print("Verification successful")
12else:
13 print("Invalid code")