POST
/users/{id}/settings/2fa
curl \
-X POST https://wanhost-sandbox-api.onsplrge.live/users/920e4e75-3995-4056-a48d-a1c83ea9ea66/settings/2fa \
-H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
"uri": "otpauth://totp/Wan-Host:victor%40splrge.dev?secret=YXGQLDKVSSUEEBHTV3WAQYVVWTQXXR2H&issuer=Wan-Host&period=30&algorithm=SHA1&digits=6",
"qr": "https://chart.googleapis.com/chart?cht=qr&chs=200x200&chl=otpauth://totp/Wan-Host:victor%40splrge.dev?secret=YXGQLDKVSSUEEBHTV3WAQYVVWTQXXR2H&issuer=Wan-Host&period=30&algorithm=SHA1&digits=6"
}
Response examples (400)
TOTP Already configured
{
"message": "TOTP is already configured"
}
{
"message": "Wrong code"
}