Exchange 2Fa Challenge
curl --request POST \
--url https://api.example.com/api/v1/auth/2fa/exchange \
--header 'Content-Type: application/json' \
--data '
{
"challenge_token": "<string>",
"code": "<string>"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({challenge_token: '<string>', code: '<string>'})
};
fetch('https://api.example.com/api/v1/auth/2fa/exchange', 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/exchange"
payload = {
"challenge_token": "<string>",
"code": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"access_token": "<string>",
"refresh_token": "<string>",
"token_type": "Bearer",
"expires_in": 900
}Auth
Exchange 2Fa Challenge
Exchange a 2fa_pending challenge token + code for real tokens.
POST
/
api
/
v1
/
auth
/
2fa
/
exchange
Exchange 2Fa Challenge
curl --request POST \
--url https://api.example.com/api/v1/auth/2fa/exchange \
--header 'Content-Type: application/json' \
--data '
{
"challenge_token": "<string>",
"code": "<string>"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({challenge_token: '<string>', code: '<string>'})
};
fetch('https://api.example.com/api/v1/auth/2fa/exchange', 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/exchange"
payload = {
"challenge_token": "<string>",
"code": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"access_token": "<string>",
"refresh_token": "<string>",
"token_type": "Bearer",
"expires_in": 900
}