Skip to main content
POST
/
api
/
user
/
mfa
/
totp
/
set-key
Set TOTP MFA key
curl --request POST \
  --url https://studio.edgeimpulse.com/v1/api/user/mfa/totp/set-key \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "key": "<string>",
  "totpToken": "<string>"
}'
{
  "success": true,
  "error": "<string>",
  "recoveryCodes": [
    "<string>"
  ]
}

Authorizations

x-api-key
string
header
required

Body

application/json
key
string
required

Secret key obtained through userGenerateNewMfaKey.

totpToken
string
required

TOTP token that is valid for the key (to ensure the device is configured correctly)

Response

200 - application/json

OK

success
boolean
required

Whether the operation succeeded

recoveryCodes
string[]
required

10 recovery codes, which can be used in case you've lost access to your MFA TOTP app. Recovery codes are single use. Once you've used a recovery code once, it can not be used again.

error
string

Optional error description (set if 'success' was false)

I