Get the provisioning URI and the secret for the authenticator app. Use them to enable the time-based one-time password (TOTP).
PUT
/auth/totp
curl
curl -X PUT "http://api.example.com/auth/totp" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
import requests
url = "http://api.example.com/auth/totp"
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json"
}
params = {}
payload = None
response = requests.put(
url,
headers=headers,
params=params,
json=payload
)
response.raise_for_status()
if response.content:
print(response.json())
Response examples (200)
{
"totp_provisionning_uri": "string",
"otp_secret": "string"
}