Skip to content
Developer

User2Factor

Login and sessions4 EndpointsUser / User2Factor

This method will create a new User2Factor Object for given type

GET/api/base/2fa/new/{type}

Path parameters

typerequiredstring

Responses

200This method will create a new User2Factor Object for given typeUser2Factor

Show fields (7)
  • idinteger

    Primary key of the two-factor entry. Internal ID.

  • factor_typestring

    Type of the second factor, for example TOTP.

  • shared_secretstring

    Shared secret of the second factor. Only returned in the factor details (group fa_details).

  • qr_code_contentstring

    Content of the QR code used to set up the second factor. Only returned during setup.

  • createdstring (date-time)

    Point in time the entity was created.

  • updatedstring (date-time)

    Point in time the entity was last updated.

  • deletedboolean

    This property is used to mark an entity as deleted / archived

Request
curl --request GET \
  --url https://your-instance.iw-erp.de/api/base/2fa/new/42 \
  --header 'x-iw-jwt-token: <TOKEN>'
Response 200 application/json
{
  "id": 42,
  "factor_type": "string",
  "shared_secret": "string",
  "qr_code_content": "string",
  "created": "2026-10-15T09:30:00+02:00",
  "updated": "2026-10-15T09:30:00+02:00",
  "deleted": true
}

This method will verify a User2Factor Object

GET/api/base/2fa/verify/{id}/{code}

Path parameters

idrequiredstring
coderequiredstring

Responses

200This method will verify a User2Factor ObjectUser2Factor2

Show fields (5)
  • idinteger

    Primary key of the two-factor entry. Internal ID.

  • factor_typestring

    Type of the second factor, for example TOTP.

  • createdstring (date-time)

    Point in time the entity was created.

  • updatedstring (date-time)

    Point in time the entity was last updated.

  • deletedboolean

    This property is used to mark an entity as deleted / archived

Request
curl --request GET \
  --url https://your-instance.iw-erp.de/api/base/2fa/verify/42/42 \
  --header 'x-iw-jwt-token: <TOKEN>'
Response 200 application/json
{
  "id": 42,
  "factor_type": "string",
  "created": "2026-10-15T09:30:00+02:00",
  "updated": "2026-10-15T09:30:00+02:00",
  "deleted": true
}

This method will delete a User2Factor Object, requires a valid 2fa code

DELETE/api/base/2fa/delete/{id}/{code}

Path parameters

idrequiredstring
coderequiredstring

Responses

200This method will delete a User2Factor Object, requires a valid 2fa codeUser2Factor2

Show fields (5)
  • idinteger

    Primary key of the two-factor entry. Internal ID.

  • factor_typestring

    Type of the second factor, for example TOTP.

  • createdstring (date-time)

    Point in time the entity was created.

  • updatedstring (date-time)

    Point in time the entity was last updated.

  • deletedboolean

    This property is used to mark an entity as deleted / archived

Request
curl --request DELETE \
  --url https://your-instance.iw-erp.de/api/base/2fa/delete/42/42 \
  --header 'x-iw-jwt-token: <TOKEN>'
Response 200 application/json
{
  "id": 42,
  "factor_type": "string",
  "created": "2026-10-15T09:30:00+02:00",
  "updated": "2026-10-15T09:30:00+02:00",
  "deleted": true
}

This method will get all available User2Factor Objects

GET/api/base/2fa/list

Query parameters

searchStringstringtext to search for in the list
orderFieldNamestringname of the order field
orderFieldSortstringsorting modeAllowed: DESCASC
pageintegerpage of the list
pageSizeintegernumber of entries for each page
withMaxPageNumberstringreturns the number of pages available as a header if this is set

Responses

200This method will get all available User2Factor Objectsarray<User2Factor2>

Show fields (5)
  • idinteger

    Primary key of the two-factor entry. Internal ID.

  • factor_typestring

    Type of the second factor, for example TOTP.

  • createdstring (date-time)

    Point in time the entity was created.

  • updatedstring (date-time)

    Point in time the entity was last updated.

  • deletedboolean

    This property is used to mark an entity as deleted / archived

Request
curl --request GET \
  --url https://your-instance.iw-erp.de/api/base/2fa/list \
  --header 'x-iw-jwt-token: <TOKEN>'
Response 200 application/json
[
  {
    "id": 42,
    "factor_type": "string",
    "created": "2026-10-15T09:30:00+02:00",
    "updated": "2026-10-15T09:30:00+02:00",
    "deleted": true
  }
]