OTP Challenge
POST
/api/v1/login/otp
const url = 'https://api.spartanauth.com/api/v1/login/otp';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"username":"example","password":"example","transactionID":"example","sectorID":"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/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.
Request Body
Section titled “Request Body ” 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"}Responses
Section titled “ Responses ”A successful response.
Media type application/json
object
transactionID
string
status
string
challengeType
string
token
string
Example
{ "status": "SUCCESS"}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" } ]}