platform
2fa
pin-sending-and-verification
send-pin-over-sms

Send 2FA PIN code over SMS

Send a PIN code over SMS using a previously created message template.

post/2fa/2/pin

Request

  • Base URL
    https://api.infobip.com (the document declares no server; this is the origin it was published from)
  • Auth
    • HTTP basic
    • or API key in header Authorization
    • or API key in header Authorization
    • or OAuth 2
      Client credentials
      Token URL: https://api.infobip.com/auth/1/oauth2/token

Query parameters

ncNeededboolean

Indicates if Number Lookup is needed before sending the 2FA message. If the parameter value is true, Number Lookup will be requested before sending the SMS. If the value is false, the SMS will be sent without requesting Number Lookup. Field's default value is true.

Request body

applicationIdstring required

The ID of the application that represents your service, e.g. 2FA for login, 2FA for changing the password, etc.

fromstring

Use this parameter if you wish to override the sender ID from the created message template parameter senderId.

messageIdstring required

The ID of the message template (message body with the PIN placeholder) that is sent to the recipient.

placeholdersobject

Key value pairs that will be replaced during message sending. Placeholder keys should NOT contain curly brackets and should NOT contain a pin placeholder. Valid example: "placeholders":{"firstName":"John"}

tostring required

Phone number to which the 2FA message will be sent. Example: 41793026727.

trackDeliveryboolean

Enables sending of delivery reports via Subscriptions. The retry cycle for when your URL becomes unavailable uses the following formula: 1min + (1min * retryNumber * retryNumber).

Response

successful response

callStatusstring

Call status, e.g. PENDING_ACCEPTED.

externalMessageIdstring

Message ID used for delivery tracking.

ncStatusstring

Status of sent Number Lookup. Number Lookup status can have one of the following values: NC_DESTINATION_UNKNOWN, NC_DESTINATION_REACHABLE, NC_DESTINATION_NOT_REACHABLE, NC_NOT_CONFIGURED. Contact your Account Manager, if you get the NC_NOT_CONFIGURED status. SMS will not be sent only if Number Lookup status is NC_NOT_REACHABLE.

pinIdstring

Sent PIN code ID.

smsStatusstring

Sent SMS status. Can have one of the following values: MESSAGE_SENT, MESSAGE_NOT_SENT.

tostring

Phone number to which the 2FA message will be sent. Example: 41793026727.

Changes

No recorded changes to this operation across all 1 revision of this API.