PUT /auth/totp

Prepare TOTP (Time-based One-Time Password) for enabling. It returns provisioning URI and secret for authenticator app setup.

Responses

  • 200

    TOTP pre-enabled

  • 400

    TOTP already enabled

PUT /auth/totp
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())
curl \
 --request PUT 'http://api.example.com/auth/totp' \
 --header "Authorization: $API_KEY"