Attaching a sample code for generating TOTP using pyotp.
import pyotp as tp
Define your secret keysecret_key = "SECRET CODE HERE" # Replace this with your actual secret key
Generate TOTPtotp = tp.TOTP(secret_key)
current_otp = totp.now()
Regards,
SmartAPI Team