v1

latestOpenAPI 3.0.12026-07-2471135326.0 KB
Two Factor Codes

Generate & Send Code

This endpoint allows you to generate and send the Two Factor Authentication code to the end user. You need to provide the channel from which the code will be sent and phone number or email adrees from who will recieve the code. You need to provide the code generator <code>id</code> you want to use, the channel where you want the code to be sent. If you want to send the code via SMS channel, provide the phone number to whom the 2FA message will be sent, otherwise provide the email address who will receive the 2FA message if you send the code via Email channel.Once the code has been generated and sent to the recipient, you will be provided with a <code>request_id</code> and the user will be provided with a security code that he requested.

post/v1/2fa/{id}/codes

Path parameters

idinteger required

Provide the unique ID of the code generator

Request body

channel'SMS' | 'EMAIL' | 'WHATSAPP' required

two factor authentication channel

receiverstring required

two factor authentication code receiver

Example request

{
  "channel": "SMS|EMAIL|WHATSAPP",
  "receiver": "1234|username@domain.com"
}

Response

Code Request Created

Example response

{
  "meta": {
    "timestamp": 1597166699457,
    "transactionId": "70169d77-c165-4795-9932-35b8a3af96fb",
    "explain": "a descriptive text"
  }
}