Create TOTP (beta)
Initiates a TOTP authenticator for the specified user.
HTTP Request
POST /v1/auth/totps/create
Returns
A successful response returns an TOTP
object.
Body
-
Required
Unique user ID to associate the TOTP with.Minimum length is
1
. -
expires_in string
Optional
Set expiration time in minutes from now for TOTP instance that must be verified within a given timeframe to be activated. Must be between 5 to 2160 minutes (36 hours), defaults to 30 minutes if not provided.
POST
/v1/auth/totps/create
curl \
-X POST https://api.streambird.io/v1/auth/totps/create \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"user_id":"user_26l7dbfAY59ftejmm6m3OTf4oz1"}'
Request example
{
"user_id": "user_26l7dbfAY59ftejmm6m3OTf4oz1"
}
Response examples (200)
{
"user_id": "user_26l7dbfAY59ftejmm6m3OTf4oz1",
"secret": "G4YD2KSD35HSDKMISNDKDB2QN7372BPT",
"totp_id": "totp_27LbM1TMjS3gQN1vuzb1jn8Fshw",
"recovery_codes": [
"xwbwb-07bjt",
"5jsr0-9nepk",
"25gj8-2lzmw",
"sfmcz-s7o2f",
"5p9k1-01g2c",
"5p5gx-8tlvl",
"l31kr-xwd2f",
"cfz0j-dq8rz",
"st3hz-xgs86",
"drydx-is8j6",
"48qm5-na80k",
"36vyz-s6lsz",
"umzq0-iyp0g",
"nwrnu-68loe",
"797ne-vd5lm",
"zaafh-7zdhk"
],
"qr_base64": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADIEAAAAADYoy0BAAAGcElEQVR4nOyd4YrkvA5Eey7z/q+8l1nIR7exIqnksDVwzo+FThzb24WssSWlv//8eYER//vXE4BPvn/++frSHo6sa+1vbRfdv65Hn7Nxov4yqqtENJ9o3l1+nsdCzEAQMxDEjO/3D921tMq6xkZrbeY7VJ+RrfnR9e48snEj3vvDQsxAEDMQxIzv3cXqWlxtf93v+pK1/+h6dD/zLV1fqPqSzveJhZiBIGYgiBlbH3KKbO1efUn0XLQvyHxU9YypezYV+aoTYCFmIIgZCGLGIz4k269U4x3dfU82T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