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
Name | Type | Location | Required | Description |
---|---|---|---|---|
limit | number | query | No | The maximum number of second factors to return. The max and default is 50 |
offset | number | query | No | The number of second factors to skip before returning results. The default is 0 |
Example Requests
curl -X GET \
-H "Authorization: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q" \
https://alekeagle.me/api/users/me/2fa
fetch('https://alekeagle.me/api/users/me/2fa', {
method: 'GET',
headers: {
Authorization:
'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q',
},
});
Responses
- 200 OK
- 401 Unauthorized
- 403 Forbidden
- 429 Too Many Requests
- 500 Internal Server Error
- 503 Service Unavailable
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
Name | Type | Location | Required | Description |
---|---|---|---|---|
id | string | path | Yes | The User's ID |
limit | number | query | No | The maximum number of second factors to return. The max and default is 50 |
offset | number | query | No | The number of second factors to skip before returning results. The default is 0 |
Example Requests
curl -X GET \
-H "Authorization: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q" \
https://alekeagle.me/api/users/1234567890123/2fa
fetch('https://alekeagle.me/api/users/1234567890123/2fa', {
method: 'GET',
headers: {
Authorization:
'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q',
},
});
Responses
- 200 OK
- 401 Unauthorized
- 403 Forbidden
- 404 Not Found
- 429 Too Many Requests
- 500 Internal Server Error
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
Name | Type | Location | Required | Description |
---|---|---|---|---|
id | string | path | Yes | The ID of the second factor to return. |
Example Requests
curl -X GET \
-H "Authorization: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q" \
https://alekeagle.me/api/users/me/2fa/1234567890
fetch('https://alekeagle.me/api/users/me/2fa/1234567890', {
method: 'GET',
headers: {
Authorization:
'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q',
},
});
Responses
- 200 OK
- 401 Unauthorized
- 403 Forbidden
- 404 Not Found
- 429 Too Many Requests
- 500 Internal Server Error
- 503 Service Unavailable
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
Name | Type | Location | Required | Description |
---|---|---|---|---|
uid | string | path | Yes | The User's ID |
id | string | path | Yes | The ID of the second factor to return. |
Example Requests
curl -X GET \
-H "Authorization: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q" \
https://alekeagle.me/api/users/1234567890123/2fa/1234567890
fetch('https://alekeagle.me/api/users/1234567890123/2fa/1234567890', {
method: 'GET',
headers: {
Authorization:
'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q',
},
});
Responses
- 200 OK
- 401 Unauthorized
- 403 Forbidden
- 404 Not Found
- 429 Too Many Requests
- 500 Internal Server Error
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
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
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
- 200 OK
- 400 Bad Request
- 401 Unauthorized
- 403 Forbidden
- 429 Too Many Requests
- 500 Internal Server Error
- 503 Service Unavailable
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
Name | Type | Location | Required | Description |
---|---|---|---|---|
token | string | body | Yes | The token returned from SecondFactorTOTPRegistration |
name | string | body | Yes | The name of the second factor. |
code | string | body | Yes | The TOTP code to verify the second factor. |
Example Requests
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
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
- 201 Created
- 400 Bad Request
- 401 Unauthorized
- 403 Forbidden
- 429 Too Many Requests
- 500 Internal Server Error
- 503 Service Unavailable
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
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
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
- 200 OK
- 400 Bad Request
- 401 Unauthorized
- 403 Forbidden
- 429 Too Many Requests
- 500 Internal Server Error
- 503 Service Unavailable
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
Name | Type | Location | Required | Description |
---|---|---|---|---|
token | string | body | Yes | The token returned from SecondFactorWebAuthnRegistration |
name | string | body | Yes | The name of the second factor. |
response | object | body | Yes | The response from the WebAuthn registration. |
Example Requests
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
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
- 201 Created
- 400 Bad Request
- 401 Unauthorized
- 403 Forbidden
- 429 Too Many Requests
- 500 Internal Server Error
- 503 Service Unavailable
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
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
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
- 200 OK
- 400 Bad Request
- 401 Unauthorized
- 403 Forbidden
- 429 Too Many Requests
- 500 Internal Server Error
- 503 Service Unavailable
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
Name | Type | Location | Required | Description |
---|---|---|---|---|
id | string | path | Yes | The ID of the second factor to delete. |
Example Requests
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
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
- 200 OK
- 400 Bad Request
- 401 Unauthorized
- 403 Forbidden
- 404 Not Found
- 429 Too Many Requests
- 500 Internal Server Error
- 503 Service Unavailable
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
Name | Type | Location | Required | Description |
---|---|---|---|---|
uid | string | path | Yes | The User's ID |
id | string | path | Yes | The ID of the second factor to delete. |
Example Requests
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
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
- 200 OK
- 400 Bad Request
- 401 Unauthorized
- 403 Forbidden
- 404 Not Found
- 429 Too Many Requests
- 500 Internal Server Error
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
curl -X DELETE \
-H "Authorization: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q" \
-H "Content-Type: application/json" \
https://alekeagle.me/api/users/me/2fa/all
fetch('https://alekeagle.me/api/users/me/2fa/all', {
method: 'DELETE',
headers: {
'Authorization':
'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q',
'Content-Type': 'application/json',
},
});
Responses
- 200 OK
- 401 Unauthorized
- 403 Forbidden
- 429 Too Many Requests
- 500 Internal Server Error
- 503 Service Unavailable
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
Name | Type | Location | Required | Description |
---|---|---|---|---|
uid | string | path | Yes | The User's ID |
Example Requests
curl -X DELETE \
-H "Authorization: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q" \
-H "Content-Type: application/json" \
https://alekeagle.me/api/users/1234567890123/2fa/all
fetch('https://alekeagle.me/api/users/1234567890123/2fa/all', {
method: 'DELETE',
headers: {
'Authorization':
'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q',
'Content-Type': 'application/json',
},
});
Responses
- 200 OK
- 401 Unauthorized
- 403 Forbidden
- 404 Not Found
- 429 Too Many Requests
- 500 Internal Server Error