auth.v1.MFAService
BeginTOTPEnrollment
Start authenticator-app enrollment.
Method
POST
Path
auth.v1.MFAService/BeginTOTPEnrollment
Service
auth.v1.MFAService
Visibility
Authentication
Session token
MFA Requirement
POST
auth.v1.MFAService/BeginTOTPEnrollment Request
Testnet
curl --request POST \ \
--url 'https://api.testnet.polyester.com/auth.v1.MFAService/BeginTOTPEnrollment' \
--header 'Content-Type: application/json' \
--header 'Connect-Protocol-Version: 1' \
--data '{
"label": "Primary Authenticator"
}'Responses
{
"enrollmentId": "mfa_22222222222222222222222222222222",
"expiresAt": "2025-01-01T00:00:00Z",
"otpauthUri": "otpauth://totp/Polyester:trader_alpha?secret=JBSWY3DPEHPK3PXP&issuer=Polyester",
"secret": "JBSWY3DPEHPK3PXP"
}Request
auth.v1.BeginTOTPEnrollmentRequestResponse
auth.v1.BeginTOTPEnrollmentResponse label string
Optional human-friendly label. Defaults to "Authenticator App" when empty. Maximum 128 characters.
enrollmentId string
Enrollment challenge identifier. Format: "mfa_" followed by 32 lowercase hex characters.
secret string
Shared secret to enter into an authenticator app. Returned only when enrollment begins.
otpauthUri string
Authenticator-app setup URI for QR-code display. Returned only when enrollment begins.
expiresAt string (date-time)
Time when this enrollment challenge expires.
| Key | HTTP status | Connect code | Error | When |
|---|---|---|---|---|
| unauthenticated | 401 | unauthenticated | Unauthenticated | Authentication required. |
| permission-denied | 403 | permission_denied | Permission Denied | Permission denied. |
| invalid-argument | 400 | invalid_argument | Invalid Argument | Invalid argument. |
| not-found | 404 | not_found | Not Found | Not found. |
| unavailable | 503 | unavailable | Unavailable | Service unavailable. |