Skip to content

Latest commit

 

History

History
72 lines (72 loc) · 2.5 KB

Request a 2FA Pin.md

File metadata and controls

72 lines (72 loc) · 2.5 KB

Request a 2FA Pin

Request a Two Factor Authentication via text message. This method generates a pin and sends it via text message to the user.

Remember to provide the authentication HTTP headers as described in the Authenticate using a session key and the Authenticate using a user tokeny sections.
All the query string parameters in URL must be UTF-8 URL Encoded.

HTTP Headers

user_key / Session_key

HTTP Method

POST

HTTP Request

https://app.gateway.smsend.it/API/v1.0/REST/2fa/request

Body Fields

Parameter Type Description Required Default
recipient String The phone number of the user. The format must be +1111111111 or 001111111111 Yes -
senderName String The sender name or number for the text message No Preferred Sender Name
expiry Integer The expiration time of the PIN, in minutes No 60
messageBody String The message body.
PIN position in the text can be specified using the %PIN% placeholder.
If the placeholder is not provided the pin will be added at the end of message body.
No A default message body per language.

Returns

Code Description
200 Pin has been successfully sent via text message.
400 [Bad request] Invalid recipient, senderName, expiry, or sending errors like not enough credit.
401 [Unauthorized] User_key, Token or Session_key are invalid or not provided
404 [Not found] The User_key was not found