2. Edit an application

You can get a specific application by using the GET HTTP method and the application’s UUID:

curl \
-H  "apiKey: yourApiKey" \
-X POST "https://api.tyntec.com/2fa/v1/application/2a9a2a1f-ad49-39e4-9a0e-8f2b648ebf83?pinLength=5&attempts=5&expire=1500&sender=ACME"

* 45bd08a1-228d-4a8b-bbfe-e59309bfa7f6 is the uuid of the specific application for this example.

 

Response to Basic Example for Edit application (JSON)

HTTP/1.1 200 OK

{
  "accountId": "yourAccountId",
  "applicationId": "2a9a2a1f-ad49-39e4-9a0e-8f2b648ebf83",
  "name": "default",
  "pinLength": 5,
  "alphanumeric": false,
  "attempts": 5,
  "expire": 1500,
  "template": {
    "en": "OTP code: {{OTP}}. Valid for {{SEC}} seconds.",
    "en-voice": "Your OTP code is  {{OTP}} . Repeat of OTP Code: {{OTP}}"
  },
  "sender": "ACME",
  "created": 1499695238322
}

* 2a9a2a1f-ad49-39e4-9a0e-8f2b648ebf83 is the uuid of the specific application for this example.

 

In this request, there are a number of parameters that need to be defined, while others are optional:

Parameter

Optional/ Mandatory

Possible Values

Description

applicationId

mandatory

The applicationId of the application you would like to edit

This parameter is part of the URI following the pattern

${baseURL}/application/{applicationId}

You can specify "default" to reference the default application

name

optional

The name for this application. Only “default” is not allowed

This parameter represents the custom name for this application. Only “default” is reserved as it maps to the default application for this user.

pinLength

optional

Integer. 4-11 allowed values

The length of the auto generated PIN length.

alphaNumeric

optional

boolean

If this parameter is true then the autogenerated PIN will be an alphanumeric PIN in small case.

By default this false is false, and the PIN is generated with numeric values.

attempts

optional

Integer

This parameter controls how many attempts the user is allowed to have to validate a delivered OTP.

expire

optional

Integer

This parameter controls the expiration time in seconds after the first OTP delivery request.

sender

optional

String

This parameter is controlling the sender name upon SMS delivery.

caller

optional

String

This parameter is used to define a number as caller for the voice calls. Adding this will improve the call success ratio, as some operatos filters anonymous calls