Control an Authentication
https://api.reach.talkylabs.com/rest/authentix/v1/configurations/{configurationId}/authentication-controls
This operation allows check the correctness of a code provided by the end user. This operations only concerns authentication in awaiting
state.
In case a check is performs on a authentication whose status is different from awaiting
, an 404 HTTP response is returned.
Parameters
configurationIdstringrequiredpath
The identifier of the configuration being used.
deststringoptional
The phone number or email being authenticated. Phone numbers must be in E.164 format. Either this parameter or the
authenticationId
must be specified.codestringoptional
The 4-10 character string being verified. This is required for
sms
andemail
channels.authenticationIdstringoptional
The ID of the authentication being checked. Either this parameter or the to
dest
must be specified.paymentInfostringoptional
Information related to the digital payment to authenticate. It is required when
usedForDigitalPayment
is true. It is ignored otherwise. It is a stringfied JSON map where keys arepayee
,amount
, andcurrency
and the associated values are respectively the payee, the amount, and the currency of a financial transaction. For example"{'payee': 'ACME', 'amount': '1000', 'currency': 'xaf'}"
.
Example 1: Check the correctness of a code using the ID
The example below demonstrates how to check a authentication with an identifier using the Reach Authentix API.
curl -X POST https://api.reach.talkylabs.com/rest/authentix/v1/configurations/CIDXXXXXXXXXXXX/authentication-controls --data-urlencode "authenticationId=VIDXXXXXXXXXXXX" --data-urlencode "code=10234" -H "ApiUser: $REACH_TALKYLABS_API_USER" -H "ApiKey: $REACH_TALKYLABS_API_KEY"
{
"appletId": "AIDXXXXXXXXXXXX",
"apiVersion": "1.0.0",
"configurationId": "CIDXXXXXXXXXXXX",
"authenticationId": "VIDXXXXXXXXXXXX",
"status": "passed",
"dest": "+237671234567",
"channel": "sms",
"paymentInfo": {
"payee": "ACME",
"amount": 1000,
"currency": "xaf"
},
"dateCreated": "2016-08-29T09:12:33.001Z",
"dateUpdated": "2016-08-29T09:12:35.001Z"
}
Example 2: Check the correctness of a code using the phone number
The example below demonstrates how to check a authentication with a phone number using the Reach Authentix API.
curl -X POST https://api.reach.talkylabs.com/rest/authentix/v1/configurations/CIDXXXXXXXXXXXX/authentication-controls --data-urlencode "dest=+237671234567" --data-urlencode "code=10234" -H "ApiUser: $REACH_TALKYLABS_API_USER" -H "ApiKey: $REACH_TALKYLABS_API_KEY"
{
"appletId": "AIDXXXXXXXXXXXX",
"apiVersion": "1.0.0",
"configurationId": "CIDXXXXXXXXXXXX",
"authenticationId": "VIDXXXXXXXXXXXX",
"status": "passed",
"dest": "+237671234567",
"channel": "sms",
"paymentInfo": {
"payee": "ACME",
"amount": 1000,
"currency": "xaf"
},
"dateCreated": "2016-08-29T09:12:33.001Z",
"dateUpdated": "2016-08-29T09:12:35.001Z"
}
Example 3: Check the correctness of a code using the email
The example below demonstrates how to check a authentication with an email using the Reach Authentix API.
curl -X POST https://api.reach.talkylabs.com/rest/authentix/v1/configurations/CIDXXXXXXXXXXXX/authentication-controls --data-urlencode "dest=user@customsite.com" --data-urlencode "code=10234" -H "ApiUser: $REACH_TALKYLABS_API_USER" -H "ApiKey: $REACH_TALKYLABS_API_KEY"
{
"appletId": "AIDXXXXXXXXXXXX",
"apiVersion": "1.0.0",
"configurationId": "CIDXXXXXXXXXXXX",
"authenticationId": "VIDXXXXXXXXXXXX",
"status": "passed",
"dest": "+237671234567",
"channel": "sms",
"paymentInfo": {
"payee": "ACME",
"amount": 1000,
"currency": "xaf"
},
"dateCreated": "2016-08-29T09:12:33.001Z",
"dateUpdated": "2016-08-29T09:12:35.001Z"
}
Example 4: Check the correctness of a code on a digital payment transaction
The example below demonstrates how to check a authentication on a digital payment transaction using the Reach Authentix API.
curl -X POST https://api.reach.talkylabs.com/rest/authentix/v1/configurations/CIDXXXXXXXXXXXX/authentication-controls --data-urlencode "dest=+237671234567" --data-urlencode "code=10234" --data-urlencode "paymentInfo={'payee': 'ACME', 'amount': '1000', 'currency': 'xaf'}" -H "ApiUser: $REACH_TALKYLABS_API_USER" -H "ApiKey: $REACH_TALKYLABS_API_KEY"
{
"appletId": "AIDXXXXXXXXXXXX",
"apiVersion": "1.0.0",
"configurationId": "CIDXXXXXXXXXXXX",
"authenticationId": "VIDXXXXXXXXXXXX",
"status": "passed",
"dest": "+237671234567",
"channel": "sms",
"paymentInfo": {
"payee": "ACME",
"amount": 1000,
"currency": "xaf"
},
"dateCreated": "2016-08-29T09:12:33.001Z",
"dateUpdated": "2016-08-29T09:12:35.001Z"
}