为用户导入 TOTP
POST
/api/v2/mfa/totp/import请求参数
Header 参数
Authorization
string
Token
示例值:
Bearer eyJhb
x-authing-userpool-id
string
用户池 ID
示例值:
61b95d6c96d42670da568408
Body 参数application/json
userId
string
用户 ID
secret
string
密钥,自定义
recoveryCode
string
自定义
示例
{
"userId": "string",
"secret": "string",
"recoveryCode": "string"
}
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
code
integer
必需
message
string
必需
data
object
必需
userId
string
必需
enable
boolean
必需
secret
string
必需
authenticatorType
string
必需
recoveryCode
string
必需
createdAt
string
必需
updatedAt
string
必需
id
string
必需
source
string
必需
示例
{
"code": 200,
"message": "添加 TOTP 验证器成功",
"data": {
"userId": "61de786b31d27307c7ce66c3",
"enable": true,
"secret": "sdfdf",
"authenticatorType": "totp",
"recoveryCode": "sdfsdfdsf",
"createdAt": "2022-01-13T07:57:54.073Z",
"updatedAt": "2022-01-13T07:57:54.073Z",
"id": "61dfdb82b3f67714c88cc855",
"source": "SELF"
}
}
最后修改时间: 3 年前