Verify 2Fa Setup
curl --request POST \
--url https://api.example.com/api/v1/auth/2fa/verify \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({code: '<string>'})
};
fetch('https://api.example.com/api/v1/auth/2fa/verify', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.example.com/api/v1/auth/2fa/verify"
payload = { "code": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"codes": [
"<string>"
]
}Auth
Verify 2Fa Setup
Verify TOTP code and activate 2FA. Requires password if the user has one.
POST
/
api
/
v1
/
auth
/
2fa
/
verify
Verify 2Fa Setup
curl --request POST \
--url https://api.example.com/api/v1/auth/2fa/verify \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({code: '<string>'})
};
fetch('https://api.example.com/api/v1/auth/2fa/verify', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.example.com/api/v1/auth/2fa/verify"
payload = { "code": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"codes": [
"<string>"
]
}