authentication

Create an MFA key

<Info icon="fa-light fa-lock-open" className="permission-callout"> <div className="permission-callout__header"><span className="permission-callout__title"><span className="permission-callout__label">Required permissions</span> <span className="fern-docs-badge small blue subtle rounded-full permission-callout__beta">Beta</span></span> <span className="permission-callout__learn-more">[Learn more](/developers/api-guidelines/permissions#how-permissions-work)</span></div>

No permission required. Available to all roles. </Info>

Generate and store a MFA key for the requesting user. After this call, the MFA key has the status activation pending and must be activated through a separate call (/api/v1/user/mfa/{id}).

You must provide following fields with this request:

  • type (Object required)
    • id (Number)
  • password (String required) - User password

The MFA key object returned by the server contains the following properties:

  • id (Integer) - The unique ID of this MFA key
  • status (Object) ID (Integer) - Id of status of this MFA key
    • description (String) - description of the status
  • type (Object) ID (Integer) - Id of type of this MFA key
    • description (String) - description of the type
  • secret_key (String) - Secret key (encoded in Base32) for this MFA key, will be displayed only on creation
  • otpauth (String) - Secret key as a URI encoded for QR codes, will be displayed only on creation
  • creation_date (Timestamp) - Timestamp when this MFA key was created - type: ISO 8601 timestamp format
  • activation_date (Timestamp) - Timestamp when this MFA key was activated - type: ISO 8601 timestamp format
post/api/v1/user/mfa

Request

  • Base URL: https://cdn.emnify.net
  • URL: https://cdn.emnify.net/api/v1/user/mfa
  • Auth: HTTP bearer

Request body

typeApiV1UserMfaPostRequestBodyContentApplicationJsonSchemaType required
passwordstring required

Response

Success

idnumber double
secret_keystring
otpauthstring
creation_datestring

Changes

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