Download OpenAPI specification:Download
This REST API is a service to generate OTP codes for single-use multi-factor authentication keys.
The one-time password generation process has two parts:
The code is generated and sent through the different channels of the DANAConnect platform. It is possible to generate two types of codes:
The OTP is securely hashed using BCrypt before storage and never stored in plain text.
This is a one-time use code with an expiration date, depending on the expiration time configured during generation. By default, the user can enter the wrong code 5 times before the code is disabled.
access2api scope enabled. Your DANAConnect Account Manager must ensure this permission is enabled.conversationId) for this flow.The conversation identification number in DANAConnect can be found on the activation reports page for each flow inside the Conversation Manager. Important: Every time a conversation is reactivated, a new Conversation ID will be generated.
otpFieldCode allows specifying the OTP field identifierOperations for generating One-Time Password codes. Generates secure OTP codes that are sent through DANAConnect channels.
Generates a secure One-Time Password (OTP) code based on the provided parameters.
Features:
Flow:
OTP generation request parameters
OTP generation result (check response code for success/failure)
Invalid request parameters - validation failed
Unauthorized - Invalid or missing JWT token
Generates a 6-digit numeric OTP code valid for 5 minutes
{- "conversationId": 824541,
- "fieldValues": {
- "COD1_EMAIL": "user@example.com",
- "COD1_NAME": "John Doe"
}, - "type": 1,
- "length": 6,
- "expiresInSeconds": 300,
- "maxAttempts": 5,
- "otpFieldCode": "SMS_OTP"
}The OTP was generated and sent to the conversation service
{- "requestId": "550e8400-e29b-41d4-a716-446655440000",
- "code": 1,
- "description": "Success",
- "conversationRequestId": "87a9ab9b-5abf-4802-abfa-e7b891d2a042"
}Operations for validating One-Time Password codes. Validates OTP codes entered by users against stored hashes.
Validates an OTP code entered by the user against the stored hash.
Validation Process:
Important Notes:
OTP validation result (check response code for success/failure)
Invalid request parameters - validation failed
Unauthorized - Invalid or missing JWT token
Submit the requestId received from generate endpoint along with the OTP code entered by the user
{- "requestId": "550e8400-e29b-41d4-a716-446655440000",
- "otpCode": "123456"
}The OTP code is correct and has been marked as used
{- "requestId": "550e8400-e29b-41d4-a716-446655440000",
- "code": 1,
- "description": "Success",
- "remainingAttempts": null
}