Skip to content

Begin authenticator enrollment

POST
/api/v1/totp/begin
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.

Media type application/json
object
sectorID
string
email
string
transactionID
string
displayName
string
Example generated
{
"sectorID": "example",
"email": "example",
"transactionID": "example",
"displayName": "example"
}

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"
}

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"
}
]
}