Skip to content

Second Factor Endpoints

GET /users/me/2fa

Get a list of second factor methods enabled for the current user.

Scoped Session

Requests to this endpoint using a scoped session require the session to have the SECOND_FACTOR_READ scope.

Parameters

NameTypeLocationRequiredDescription
limitnumberqueryNoThe maximum number of second factors to return. The max and default is 50
offsetnumberqueryNoThe number of second factors to skip before returning results. The default is 0

Example Requests

sh
curl -X GET \
-H "Authorization: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q" \
https://alekeagle.me/api/users/me/2fa
js
fetch('https://alekeagle.me/api/users/me/2fa', {
  method: 'GET',
  headers: {
    Authorization:
      'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q',
  },
});

Responses

GET /users/:id/2fa

Get a list of second factor methods enabled for the specified user.

Non-Public Endpoint

This endpoint is not public and requires authentication of a user with staff permissions.

Scoped Session

Requests to this endpoint using a scoped session require the session to have the STAFF_READ_SECOND_FACTORS scope.

Parameters

NameTypeLocationRequiredDescription
idstringpathYesThe User's ID
limitnumberqueryNoThe maximum number of second factors to return. The max and default is 50
offsetnumberqueryNoThe number of second factors to skip before returning results. The default is 0

Example Requests

sh
curl -X GET \
-H "Authorization: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q" \
https://alekeagle.me/api/users/1234567890123/2fa
js
fetch('https://alekeagle.me/api/users/1234567890123/2fa', {
  method: 'GET',
  headers: {
    Authorization:
      'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q',
  },
});

Responses

GET /users/me/2fa/:id

Get the specified second factor for the current user.

Scoped Session

Requests to this endpoint using a scoped session require the session to have the SECOND_FACTOR_READ scope.

Parameters

NameTypeLocationRequiredDescription
idstringpathYesThe ID of the second factor to return.

Example Requests

sh
curl -X GET \
-H "Authorization: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q" \
https://alekeagle.me/api/users/me/2fa/1234567890
js
fetch('https://alekeagle.me/api/users/me/2fa/1234567890', {
  method: 'GET',
  headers: {
    Authorization:
      'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q',
  },
});

Responses

GET /users/:uid/2fa/:id

Get the specified second factor for the specified user.

Non-Public Endpoint

This endpoint is not public and requires authentication of a user with staff permissions.

Scoped Session

Requests to this endpoint using a scoped session require the session to have the STAFF_READ_SECOND_FACTORS scope.

Parameters

NameTypeLocationRequiredDescription
uidstringpathYesThe User's ID
idstringpathYesThe ID of the second factor to return.

Example Requests

sh
curl -X GET \
-H "Authorization: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q" \
https://alekeagle.me/api/users/1234567890123/2fa/1234567890
js
fetch('https://alekeagle.me/api/users/1234567890123/2fa/1234567890', {
  method: 'GET',
  headers: {
    Authorization:
      'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q',
  },
});

Responses

POST /users/me/2fa/totp

Begins the process of registering a new TOTP second factor for the current user.

Kill Switch Behavior

This endpoint is affected by the following kill switches:

  • ACCOUNT_MODIFY(1)

and will fail with the error ServiceUnavailable if any of these kill switches are enabled.

Scoped Session

Requests to this endpoint using a scoped session are not allowed in order to prevent second factors being registered without explicit user consent.

Identity Reverification

This endpoint will require you to provide your password to confirm it's you. More information can be found in the Identity Reverification section.

Parameters

This endpoint does not require any parameters.

Example Requests

sh
curl -X POST \
-H "Authorization: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q" \
-H "Content-Type: application/json" \
-d '{"password": "password"}' \
https://alekeagle.me/api/users/me/2fa/totp
js
fetch('https://alekeagle.me/api/users/me/2fa/totp', {
  method: 'POST',
  headers: {
    'Authorization':
      'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ password: 'password' }),
});

Responses

POST /users/me/2fa/totp/confirm

Completes the process of registering a new TOTP second factor for the current user.

Kill Switch Behavior

This endpoint is affected by the following kill switches:

  • ACCOUNT_MODIFY(1)

and will fail with the error ServiceUnavailable if any of these kill switches are enabled.

Scoped Session

Requests to this endpoint using a scoped session are not allowed in order to prevent second factors being registered without explicit user consent.

Parameters

NameTypeLocationRequiredDescription
tokenstringbodyYesThe token returned from SecondFactorTOTPRegistration
namestringbodyYesThe name of the second factor.
codestringbodyYesThe TOTP code to verify the second factor.

Example Requests

sh
curl -X POST \
-H "Authorization: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q" \
-H "Content-Type: application/json" \
-d '{"token": "token", "name": "name", "code": "123456"}' \
https://alekeagle.me/api/users/me/2fa/totp/confirm
js
fetch('https://alekeagle.me/api/users/me/2fa/totp/confirm', {
  method: 'POST',
  headers: {
    'Authorization':
      'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ token: 'token', name: 'name', code: '123456' }),
});

Responses

POST /users/me/2fa/webauthn

Begins the process of registering a new WebAuthn second factor for the current user.

Kill Switch Behavior

This endpoint is affected by the following kill switches:

  • ACCOUNT_MODIFY(1)

and will fail with the error ServiceUnavailable if any of these kill switches are enabled.

Scoped Session

Requests to this endpoint using a scoped session are not allowed in order to prevent second factors being registered without explicit user consent.

Identity Reverification

This endpoint will require you to provide your password to confirm it's you. More information can be found in the Identity Reverification section.

Parameters

This endpoint does not require any parameters.

Example Requests

sh
curl -X POST \
-H "Authorization: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q" \
-H "Content-Type: application/json" \
-d '{"password": "password"}' \
https://alekeagle.me/api/users/me/2fa/webauthn
js
fetch('https://alekeagle.me/api/users/me/2fa/webauthn', {
  method: 'POST',
  headers: {
    'Authorization':
      'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ password: 'password' }),
});

Responses

POST /users/me/2fa/webauthn/confirm

Completes the process of registering a new WebAuthn second factor for the current user.

Kill Switch Behavior

This endpoint is affected by the following kill switches:

  • ACCOUNT_MODIFY(1)

and will fail with the error ServiceUnavailable if any of these kill switches are enabled.

Scoped Session

Requests to this endpoint using a scoped session are not allowed in order to prevent second factors being registered without explicit user consent.

Parameters

NameTypeLocationRequiredDescription
tokenstringbodyYesThe token returned from SecondFactorWebAuthnRegistration
namestringbodyYesThe name of the second factor.
responseobjectbodyYesThe response from the WebAuthn registration.

Example Requests

sh
curl -X POST \
-H "Authorization: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q" \
-H "Content-Type: application/json" \
-d '{"token": "token", "name": "name", "response": {}}' \
https://alekeagle.me/api/users/me/2fa/webauthn/confirm
js
fetch('https://alekeagle.me/api/users/me/2fa/webauthn/confirm', {
  method: 'POST',
  headers: {
    'Authorization': 'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    token: 'token
    name: 'name',
    response: {}
  }),
});

Responses

POST /users/me/2fa/backup

Regenerate backup codes for the current user. You must have at least one second factor enabled to use this endpoint.

Kill Switch Behavior

This endpoint is affected by the following kill switches:

  • ACCOUNT_MODIFY(1)

and will fail with the error ServiceUnavailable if any of these kill switches are enabled.

Scoped Session

Requests to this endpoint using a scoped session are not allowed in order to prevent second factors being registered without explicit user consent.

Identity Reverification

This endpoint will require you to provide your password to confirm it's you. More information can be found in the Identity Reverification section.

Parameters

This endpoint does not require any parameters.

Example Requests

sh
curl -X POST \
-H "Authorization: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q" \
-H "Content-Type: application/json" \
-d '{"password": "password"}' \
https://alekeagle.me/api/users/me/2fa/backup
js
fetch('https://alekeagle.me/api/users/me/2fa/backup', {
  method: 'POST',
  headers: {
    'Authorization':
      'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ password: 'password' }),
});

Responses

DELETE /users/me/2fa/:id

Deletes the specified second factor for the current user.

Kill Switch Behavior

This endpoint is affected by the following kill switches:

  • ACCOUNT_MODIFY(1)

and will fail with the error ServiceUnavailable if any of these kill switches are enabled.

Scoped Session

Requests to this endpoint using a scoped session are not allowed in order to prevent second factors being registered without explicit user consent.

Identity Reverification

This endpoint will require you to provide your password to confirm it's you. More information can be found in the Identity Reverification section.

Parameters

NameTypeLocationRequiredDescription
idstringpathYesThe ID of the second factor to delete.

Example Requests

sh
curl -X DELETE \
-H "Authorization: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q" \
-H "Content-Type: application/json" \
-d '{"password": "password"}' \
https://alekeagle.me/api/users/me/2fa/1234567890
js
fetch('https://alekeagle.me/api/users/me/2fa/1234567890', {
  method: 'DELETE',
  headers: {
    'Authorization':
      'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ password: 'password' }),
});

Responses

DELETE /users/:uid/2fa/:id

Deletes the specified second factor for the specified user.

Non-Public Endpoint

This endpoint is not public and requires authentication of a user with staff permissions.

Scoped Session

Requests to this endpoint using a scoped session require the session to have the STAFF_MODIFY_SECOND_FACTORS scope.

Identity Reverification

This endpoint will require you to provide your password to confirm it's you. More information can be found in the Identity Reverification section.

Parameters

NameTypeLocationRequiredDescription
uidstringpathYesThe User's ID
idstringpathYesThe ID of the second factor to delete.

Example Requests

sh
curl -X DELETE \
-H "Authorization: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q" \
-H "Content-Type: application/json" \
-d '{"password": "password"}' \
https://alekeagle.me/api/users/1234567890123/2fa/1234567890
js
fetch('https://alekeagle.me/api/users/1234567890123/2fa/1234567890', {
  method: 'DELETE',
  headers: {
    'Authorization':
      'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ password: 'password' }),
});

Responses

DELETE /users/me/2fa/all

Deletes all second factors for the current user.

Kill Switch Behavior

This endpoint is affected by the following kill switches:

  • ACCOUNT_MODIFY(1)

and will fail with the error ServiceUnavailable if any of these kill switches are enabled.

Scoped Session

Requests to this endpoint using a scoped session are not allowed in order to prevent second factors being removed without explicit user consent.

Identity Reverification

This endpoint will require you to provide your password to confirm it's you. More information can be found in the Identity Reverification section.

Parameters

This endpoint does not require any parameters.

Example Requests

sh
curl -X DELETE \
-H "Authorization: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q" \
-H "Content-Type: application/json" \
https://alekeagle.me/api/users/me/2fa/all
js
fetch('https://alekeagle.me/api/users/me/2fa/all', {
  method: 'DELETE',
  headers: {
    'Authorization':
      'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q',
    'Content-Type': 'application/json',
  },
});

Responses

DELETE /users/:uid/2fa/all

Deletes all second factors for the specified user.

Non-Public Endpoint

This endpoint is not public and requires authentication of a user with staff permissions.

Scoped Session

Requests to this endpoint using a scoped session require the session to have the STAFF_MODIFY_SECOND_FACTORS scope.

Identity Reverification

This endpoint will require you to provide your password to confirm it's you. More information can be found in the Identity Reverification section.

Parameters

NameTypeLocationRequiredDescription
uidstringpathYesThe User's ID

Example Requests

sh
curl -X DELETE \
-H "Authorization: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q" \
-H "Content-Type: application/json" \
https://alekeagle.me/api/users/1234567890123/2fa/all
js
fetch('https://alekeagle.me/api/users/1234567890123/2fa/all', {
  method: 'DELETE',
  headers: {
    'Authorization':
      'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q',
    'Content-Type': 'application/json',
  },
});

Responses

Made with ❤️ by Alek Evans (AlekEagle)