Create a Configuration
https://api.reach.talkylabs.com/rest/authentix/v1/configurations
This operation allows to create an Authentix configuration.
Parameters
serviceNamestringrequired
The name of the authentication service attached to this configuration. It can be up to 40 characters long.
codeLengthintegeroptional
The length of the code to be generated. It must be a value between 4 and 10, inclusive. If not specified, the default value is 5.
allowCustomCodebooleanoptional
A flag indicating if the configuration should allow sending custom and pre-generated code. The default value is
false
.usedForDigitalPaymentbooleanoptional
A flag indicating if the configuration is used to authenticate digital payments. In such a case, additional information such as the amount and the payee of the financial transaction should be sent to when starting the authentication. The default value is
false
.defaultExpiryTimeintegeroptional
It represents how long, in minutes, an authentication process will remained in the
awaiting
status before moving toexpired
in the case no valid matching is performed in between.It also means that the code sent for the autentication remains the same during its validity period until the autentication is successful. In other words, if another authentication request is asked within that period, the same code will be sent.
If not specified, the default value is 15 minutes. It must be any value between 1 and 1440 which represents 24 hours.
defaultMaxTrialsintegeroptional
It represents the maximum number of authentication trials for an authentication process. The default value is 5.
defaultMaxControlsintegeroptional
It represents the maximum number of code controls for an authentication process. It must be between 1 and 6 inclusive. The default value is 3.
smtpSettingIdstringoptional
This is the ID of the SMTP settings used by this configuration. It is mandatory to provide this parameter in order to send the authentication code via email. An SMTP Setting can be created via the web console in an easy way.
emailTemplateIdstringoptional
This is the ID of the default email template to use for sending authenetication codes via email. If not provided, the message used will be:
${SERVICE_NAME}: your authentication code is ${CODE}.
smsTemplateIdstringoptional
This is the ID of the default sms template to use for sending authenetication codes via sms. If not provided, the message used will be:
${SERVICE_NAME}: your authentication code is ${CODE}.
Example 1: Create a configuration
The example below demonstrates how to create a configuration using the Reach Authentix API.
It creates a configuration with a service name corresponding to AuthService
and a code length of 6
. Furthermore, in addition to randomly generated codes, it enables the sending of custom and pre-generated codes.
curl -X POST https://api.reach.talkylabs.com/rest/authentix/v1/configurations --data-urlencode "serviceName=AuthService" --data-urlencode "codeLength=6" --data-urlencode "allowCustomCode=true" -H "ApiUser: $REACH_TALKYLABS_API_USER" -H "ApiKey: $REACH_TALKYLABS_API_KEY"
{
"appletId": "AIDXXXXXXXXXXXX",
"apiVersion": "1.0.0",
"configurationId": "CIDXXXXXXXXXXXX",
"serviceName": "myService",
"codeLength": 5,
"allowCustomCode": false,
"usedForDigitalPayment": false,
"defaultExpiryTime": 5,
"defaultMaxTrials": 5,
"defaultMaxControls": 3,
"smtpSettingId": "STPXXXXXXXXXXXXX",
"emailTemplateId": "TMEXXXXXXXXXXXXXXX",
"smsTemplateId": "TMSXXXXXXXXXXXXXXX",
"dateCreated": "2016-08-29T09:12:33.001Z",
"dateUpdated": "2016-08-29T09:12:35.001Z"
}
Example 2: Create a configuration for digital payment authentication
The example below demonstrates how to create a configuration that enables digital payment verification using the Reach Authentix API.
It creates a configuration with a service name corresponding to AuthService
and a code length of 6
. Furthermore, in addition to randomly generated codes, it enables the sending of custom codes.
curl -X POST https://api.reach.talkylabs.com/rest/authentix/v1/configurations --data-urlencode "serviceName=AuthService" --data-urlencode "codeLength=6" --data-urlencode "allowCustomCode=true" --data-urlencode "usedForDigitalPayment=true" -H "ApiUser: $REACH_TALKYLABS_API_USER" -H "ApiKey: $REACH_TALKYLABS_API_KEY"
{
"appletId": "AIDXXXXXXXXXXXX",
"apiVersion": "1.0.0",
"configurationId": "CIDXXXXXXXXXXXX",
"serviceName": "myService",
"codeLength": 5,
"allowCustomCode": false,
"usedForDigitalPayment": false,
"defaultExpiryTime": 5,
"defaultMaxTrials": 5,
"defaultMaxControls": 3,
"smtpSettingId": "STPXXXXXXXXXXXXX",
"emailTemplateId": "TMEXXXXXXXXXXXXXXX",
"smsTemplateId": "TMSXXXXXXXXXXXXXXX",
"dateCreated": "2016-08-29T09:12:33.001Z",
"dateUpdated": "2016-08-29T09:12:35.001Z"
}