Start TOTP setup REST API
POST
/api/user/security/totp/setup/start
const url = 'https://hitkeep.com/api/user/security/totp/setup/start';const options = {method: 'POST', headers: {cookie: 'hk_token=<hk_token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://hitkeep.com/api/user/security/totp/setup/start \ --cookie hk_token=<hk_token>Starts TOTP enrollment and returns secret + OTPAuth URI.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”TOTP setup
Media typeapplication/json
object
expires_at
string format: date-time
otpauth_url
string
secret
string
Examplegenerated
{ "expires_at": "2026-04-15T12:00:00Z", "otpauth_url": "example", "secret": "example"}