Skip to content

OTP Challenge

POST
/api/v1/login/otp
curl --request POST \
--url https://api.spartanauth.com/api/v1/login/otp \
--header 'Content-Type: application/json' \
--data '{ "username": "example", "password": "example", "transactionID": "example", "sectorID": "example" }'

Verifies an OTP code for the current authentication transaction. Public endpoint; returns a JWT when all required factors are satisfied, or returns the transactionID and remaining challenge type when additional MFA is still required.

Media type application/json
object
username
optional - required if initializing a new challenge flow
string
password
string
transactionID
optional
string
sectorID
string
Example generated
{
"username": "example",
"password": "example",
"transactionID": "example",
"sectorID": "example"
}

A successful response.

Media type application/json
object
transactionID
string
status
string
default: SUCCESS
Allowed values: SUCCESS UNAUTHENTICATED FORBIDDEN
challengeType
string
token
string
Example
{
"status": "SUCCESS"
}

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