Skip to content

Check a one-time code

POST
/participant/{participantId}/otp/verify
curl --request POST \
--url https://api-sandbox.trustink.io/participant/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/otp/verify \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "code": "example" }'

Five tries per code. The right code is used up and answers the session for the Trustink-Otp-Session header, valid 30 minutes.

participantId
required

The participant id: the path of the signing link, or participants[].id of the case.

string format: uuid
Trustink-Otp-Session

The otpSession of POST .../otp/verify. Needed for a case with multiFactorType: the document links, the signature and the signed document.

string
Trustink-Pin

Deprecated: the case PIN, for a case created with pin and without multiFactorType.

string
Media typeapplication/json
object
code
required
string
/^\d{6}$/
Examplegenerated
{
"code": "example"
}

The OTP session.

Media typeapplication/json
object
otpSession
required
string
expiresAt
required
string
Examplegenerated
{
"otpSession": "example",
"expiresAt": "example"
}

The code is not six digits, or wrong (code OTP_INVALID, attemptsLeft).

Media typeapplication/json
Any of:
object
message
required
string
validationErrors
required
Array<object>
object
instancePath
required
string
keyword
required
string
params
required
object
key
additional properties
message
required
string
Examplegenerated
{
"message": "example",
"validationErrors": [
{
"instancePath": "example",
"keyword": "example",
"params": {
"additionalProperty": "example"
},
"message": "example"
}
]
}

The signing link is not valid: no or a forged token, another participant’s, or a link not active before the upload (the authorizer answers {message} only).

Media typeapplication/json
object
code
string
message
required
string
Examplegenerated
{
"code": "example",
"message": "example"
}

No such participant or case.

Media typetext/plain
string
Example
Case not found

There is no code to check. code: OTP_NOT_REQUIRED, OTP_NOT_REQUESTED, OTP_EXPIRED.

Media typeapplication/json
object
code
string
message
required
string
Examplegenerated
{
"code": "example",
"message": "example"
}

Nobody can sign the case any more (status says why), or a DONE case’s link has passed validUntil; senderName names who sent the request when the tenant gave a sender name. code: CASE_NOT_ACTIVE, LINK_EXPIRED.

Media typeapplication/json
object
code
string
message
required
string
Examplegenerated
{
"code": "example",
"message": "example"
}

Five wrong codes: request a new one. code: OTP_LOCKED.

Media typeapplication/json
object
code
string
message
required
string
Examplegenerated
{
"code": "example",
"message": "example"
}

Something failed on the platform, or the request timed out (code TIMEOUT, 503); try again.

Media typeapplication/json
object
code
string
message
required
string
Examplegenerated
{
"code": "example",
"message": "example"
}