Skip to main content
POST
/
device
/
otp
/
confirm-quick-session
Confirm OTP and Get Quick Session Token
curl --request POST \
  --url https://api.getmelody.io/device/otp/confirm-quick-session \
  --header 'Content-Type: application/json' \
  --data '
{
  "otp": "123456"
}
'
{
  "token": "eyJhbGciOiJIUzI1NiIs...",
  "expires_in": 172800,
  "device_key": "alpha-bravo-charlie-delta"
}

Body

application/json
otp
string
required

The 6-digit one-time password displayed on the device.

Example:

"123456"

Response

Quick session created

Response from the quick session endpoint. Contains a short-lived session token and the Device Key for the confirmed device.

token
string
required

JWT session token for device control. Use as Authorization: Bearer <token> with X-Device-Key header.

Example:

"eyJhbGciOiJIUzI1NiIs..."

expires_in
integer
required

Token TTL in seconds (default 172800 = 48 hours).

Example:

172800

device_key
string
required

The Device Key in BIP39 word format. Use as X-Device-Key header value when making API calls.

Pattern: ^[a-z]+-[a-z]+-[a-z]+-[a-z]+$
Example:

"alpha-bravo-charlie-delta"