Finish authenticator enrollment
POST
/api/v1/totp/finish
const url = 'https://api.spartanauth.com/api/v1/totp/finish';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"sectorID":"example","email":"example","transactionID":"example","registrationID":"example","code":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.spartanauth.com/api/v1/totp/finish \ --header 'Content-Type: application/json' \ --data '{ "sectorID": "example", "email": "example", "transactionID": "example", "registrationID": "example", "code": "example" }'Verifies the authenticator code from BeginTOTPRegistration and marks that factor validated. Returns one-time recovery codes the first time the user enrolls. A logged-out enrollment that proved the password also returns a JWT.
Request Body
Section titled “Request Body ” Media type application/json
object
sectorID
string
email
string
transactionID
string
registrationID
string
code
string
Example generated
{ "sectorID": "example", "email": "example", "transactionID": "example", "registrationID": "example", "code": "example"}Responses
Section titled “ Responses ”A successful response.
Media type application/json
object
transactionID
string
recoveryCodes
Array<string>
token
string
Example generated
{ "transactionID": "example", "recoveryCodes": [ "example" ], "token": "example"}default
Section titled “default ”An unexpected error response.
Media type application/json
object
code
integer format: int32
message
string
details
Array<object>
object
@type
string
key
additional properties
Example generated
{ "code": 1, "message": "example", "details": [ { "@type": "example" } ]}