Introducing VIDA Identity Stack: All of VIDA, in one place 🎉
For the complete documentation index, see llms.txt. This page is also available as Markdown.

OTP - Completion

TOTP Provisioning Completion

The TOTP Provisioning Completion API is the second part of the TOTP provisioning process. The user sends the OTP code generated by their authenticator app and the totpSecret received during provisioning initiation. On successful verification, the server responds with a JSON Web Token (JWT) containing the newly provisioned credential ID.

API Description

Method : POST

URL : Follow up url received as part of the response of the Transaction Initiation API

Parameters

Name
Type
Description

client_id*

String

A unique client id that is shared for each partner.

totp*

String

TOTP code from the authenticator.

totpSecret*

String

totpSecret value received part of the Transaction Initiation request

Headers

Name
Type
Description

Authorization*

String

Bearer {Bearer Token Received in Transaction Initiation API}

Content-Type

String

application/x-www-form-urlencoded

{
    "entity": {
        "accessToken": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJYbnNBNFVPdlkyU0JLSkdnX1ppTHN1Tk8tZ2dlLVB0RXZzX2twRTBhd3RnIn0.eyJleHAiOjE3MDM1Nzc4NzAsIm5iZiI6MTcwMzU3NzU3MCwiaWF0IjoxNzAzNTc3NTcwLCJhdXRoX3RpbWUiOjE3MDM1Nzc1NzAsImp0aSI6ImY0ZmVmYzMxLTZkNjktNDBiOC1hMGJlLTY4MzM1OWM5ZTlkNyIsImlzcyI6Imh0dHBzOi8va2V5Y2xvYWsuYXV0aC1zdGFnZS52aWRhLmlkL3JlYWxtcy9zcHJpbmdib290LXF1aWNrc3RhcnQiLCJzdWIiOiIxMGQ3MTJhMi02NmIyLTQ5NzktOTJiYS1iMDlmMDRkMzAzYmQiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJhcGkiLCJzZXNzaW9uX3N0YXRlIjoiNGRhMWI1MTctNjQ5MS00NDhhLTllZGYtZWZlOGFkMGQxNjY4Iiwic2NvcGUiOiIiLCJzaWQiOiI0ZGExYjUxNy02NDkxLTQ0OGEtOWVkZi1lZmU4YWQwZDE2NjgiLCJzZXNzaW9uX2lkZW50aWZpZXIiOiJXU3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lkIjoiNGRhMWI1MTctNjQ5MS00NDhhLTllZGYtZWZlOGFkMGQxNjY4In0.DfCuvPluy_XLPAq5zP081Q6tldHkzNxb-K-NChSMCmw",
        "refreshExpiresIn": 1800,
        "authType": "otp"
    },
    "uri": "https://{environment-url}/realms/{partner-id}/protocol/api/required-action",
    "bearerToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI0ZGExYjUxNy02NDkxLTQ0OGEtOWVkZi1lZmU4YWQwZDE2NjgiLCJleGVjdXRpb24iOiJDT05GSUdVUkVfVE9UUCIsInRhYl9pZCI6IldTcU5mcWJZZ1RnIiwibmJmIjoxNzAzNTc3NTcwLCJzZXNzaW9uX2NvZGUiOiJCU2NlX1ZEN2oxRThyMG1KTTFQYTBhVDhZWFpQMWtxWW5Hd04zaGxUb1c0Iiwic2Vzc2lvbl9pZGVudGlmaWVyIjoiV1NxTmZxYllnVGciLCJleHAiOjE3MDM1Nzc4NzAsImlhdCI6MTcwMzU3NzU3MCwiYXV0aF9zZXNzaW9uX2lkIjoiNGRhMWI1MTctNjQ5MS00NDhhLTllZGYtZWZlOGFkMGQxNjY4IiwianRpIjoiNWEwODQ3MWQtMDc3Yi00YWI5LTlhYWItMDg3MjQ1M2FhMDVhIn0.jOXhKWj9DPT1xWGD0LjLShY0PEDNQ9RSa22AkepXQCE",
    "authType": "otp"
}

Success Response

The (JWT)access token issued after a successful OTP verificationwill include the provisioned credential id which can be used for the subsequent request pertaining to the user. The signed JWT tokens contain parameters along with corresponding explanations.

Error Response

Response Schema

For a complete list of error codes and their meanings, refer to the Error Scenarios section.

TOTP Authentication API

The TOTP Authentication API is used when a user wants to authenticate their identity using the OTP method. After initiating a request for authentication, the server will respond with a session ID, bearer token, and a challenge. The user will respond to this challenge by generating and submitting the OTP from their chosen authenticator app. The API will validate this OTP against the secret stored during the provisioning phase.

API Description

Method : POST

URL : Follow up url received as part of the response of the Transaction Initiation API

Parameters

Name
Type
Description

client_id*

String

A unique client id that is shared for each partner.

totp

String

OTP code from the authenticator.

Headers

Name
Type
Description

Authorization

String

Bearer {Bearer Token Received in Transaction Initiation API}

Content-Type

String

application/x-www-form-urlencoded

Success Response

Error Response

Response Schema

For a complete list of error codes and their meanings, refer to the Error Scenarios section.

Last updated