Skip to main content
POST
/
v2
/
session
/
apps
/
{appID}
/
config
/
login
/
otp
Create OTP login config
curl --request POST \
  --url https://api.prelude.dev/v2/session/apps/{appID}/config/login/otp \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "config_type": "otp",
  "template_id": "<string>",
  "sender_id": "<string>",
  "is_default": true,
  "granted_scopes": [
    "<string>"
  ]
}
'
{
  "login_config": {
    "id": "<string>",
    "config_type": "otp",
    "is_default": true,
    "granted_scopes": [
      "<string>"
    ],
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "template_id": "<string>",
    "sender_id": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

appID
string
required

The id of the app the request refers to. An application's unique identifier.

Examples:

"54e9ujn"

"fvua38g"

Body

application/json
config_type
enum<string>
required
Available options:
otp
Example:

"otp"

channel_type
enum<string>
required
Available options:
sms,
email
Example:

"sms"

template_id
string
Example:

"tpl_01jqebhswje1ka1z7ahr9rfsgt"

sender_id
string
Example:

"Prelude"

is_default
boolean
Example:

false

granted_scopes
string[]

Session scopes attached to the session when a login completes through this OTP configuration (for example prld:pwd:write).

Example:
["prld:pwd:write"]

Response

Created

login_config
object
required