Begin authenticator enrollment
POST
/api/v1/totp/begin
const url = 'https://api.spartanauth.com/api/v1/totp/begin';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"sectorID":"example","email":"example","transactionID":"example","displayName":"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/begin \ --header 'Content-Type: application/json' \ --data '{ "sectorID": "example", "email": "example", "transactionID": "example", "displayName": "example" }'Starts authenticator-app (TOTP) enrollment. A logged-in user calls it with a bearer token. A logged-out caller must present a transaction that already passed the password challenge. The response includes the shared secret and otpauth URL once.
Request Body
Section titled “Request Body ” Media type application/json
object
sectorID
string
email
string
transactionID
string
displayName
string
Example generated
{ "sectorID": "example", "email": "example", "transactionID": "example", "displayName": "example"}Responses
Section titled “ Responses ”A successful response.
Media type application/json
object
transactionID
string
registrationID
string
secret
string
otpauthURL
string
Example generated
{ "transactionID": "example", "registrationID": "example", "secret": "example", "otpauthURL": "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" } ]}