用户名注册
测试中
POST
/api/v2/register/username
请求参数
Header 参数
x-authing-userpool-id
string
必需
Body 参数application/json
username
string
必需
password
string
必需
示例
{
"username": "string",
"password": "string"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://core.authing.cn/api/v2/register/username' \
--header 'x-authing-userpool-id;' \
--header 'Content-Type: application/json' \
--data-raw '{
"username": "string",
"password": "string"
}'
返回响应
🟢201成功
application/json
Body
thirdPartyIdentity
object
必需
provider
null
必需
refreshToken
null
必需
accessToken
null
必需
scope
null
必需
expiresIn
null
必需
updatedAt
null
必需
userPoolId
string
必需
username
string
必需
password
string
必需
salt
string
必需
registerSource
array[string]
必需
encryptedPassword
string
必需
userSourceType
string
必需
passwordSecurityLevel
integer
必需
createdAt
string
必需
updatedAt
string
必需
id
string
必需
statusChangedAt
null
必需
oauth
null
必需
email
null
必需
phone
null
必需
unionid
null
必需
openid
null
必需
nickname
null
必需
company
null
必需
photo
string
必需
browser
null
必需
device
null
必需
passwordLastSetAt
null
必需
lastIp
null
必需
name
null
必需
givenName
null
必需
familyName
null
必需
middleName
null
必需
profile
null
必需
preferredUsername
null
必需
website
null
必需
birthdate
null
必需
zoneinfo
null
必需
locale
null
必需
address
null
必需
formatted
null
必需
streetAddress
null
必需
locality
null
必需
region
null
必需
postalCode
null
必需
city
null
必需
province
null
必需
country
null
必需
secretInfo
null
必需
lastLogin
null
必需
lastLoginApp
null
必需
userSourceId
null
必需
signedUp
null
必需
externalId
null
必需
mainDepartmentId
null
必需
mainDepartmentCode
null
必需
lastMfaTime
null
必需
syncExtInfo
null
必需
phoneCountryCode
null
必需
isRoot
boolean
必需
status
string
必需
loginsCount
integer
必需
gender
string
必需
emailVerified
boolean
必需
phoneVerified
boolean
必需
isDeleted
boolean
必需
sendSmsCount
integer
必需
sendSmsLimitCount
integer
必需
resetPasswordOnFirstLogin
boolean
必需
resetPasswordOnNextLogin
boolean
必需
resetedPassword
boolean
必需
_id
string
必需
registerMethod
string
必需
registerInClient
string
必需
lastIP
null
必需
identities
array[string]
必需
示例
{
"thirdPartyIdentity": {
"provider": null,
"refreshToken": null,
"accessToken": null,
"scope": null,
"expiresIn": null,
"updatedAt": null
},
"userPoolId": "62d4d32f7e6b94ceb07c15fa",
"username": "test1",
"password": "c1812ead6ceac16387b719f7c87489f6",
"salt": "f86gc4hapdd",
"registerSource": [
"basic:username-password"
],
"encryptedPassword": "mzvUEYoBNeM6mIyT9jxmgPh1XNUhag/mUq2z6n9AaqzE2AiILr4pn92PO7hp8VMQ3lkavv9ZULVEuTznl9DrgKWvrRxcsEctOvrPK2akfWTdiirEN33vo3JJcf+bKTVnGmsPHsosuLqYOi3u7kAXMDxNITomcs7qfqCvb4LiXKs=",
"userSourceType": "register",
"passwordSecurityLevel": 1,
"createdAt": "2022-07-19T06:55:24.309Z",
"updatedAt": "2022-07-19T06:55:24.309Z",
"id": "62d6555c512418a49940e9e5",
"statusChangedAt": null,
"oauth": null,
"email": null,
"phone": null,
"unionid": null,
"openid": null,
"nickname": null,
"company": null,
"photo": "https://files.authing.co/authing-console/default-user-avatar.png",
"browser": null,
"device": null,
"passwordLastSetAt": null,
"lastIp": null,
"name": null,
"givenName": null,
"familyName": null,
"middleName": null,
"profile": null,
"preferredUsername": null,
"website": null,
"birthdate": null,
"zoneinfo": null,
"locale": null,
"address": null,
"formatted": null,
"streetAddress": null,
"locality": null,
"region": null,
"postalCode": null,
"city": null,
"province": null,
"country": null,
"secretInfo": null,
"lastLogin": null,
"lastLoginApp": null,
"userSourceId": null,
"signedUp": null,
"externalId": null,
"mainDepartmentId": null,
"mainDepartmentCode": null,
"lastMfaTime": null,
"syncExtInfo": null,
"phoneCountryCode": null,
"isRoot": false,
"status": "Activated",
"loginsCount": 0,
"gender": "U",
"emailVerified": false,
"phoneVerified": false,
"isDeleted": false,
"sendSmsCount": 0,
"sendSmsLimitCount": 1000,
"resetPasswordOnFirstLogin": false,
"resetPasswordOnNextLogin": false,
"resetedPassword": false,
"_id": "62d6555c512418a49940e9e5",
"registerMethod": "basic:username-password",
"registerInClient": "62d4d32f7e6b94ceb07c15fa",
"lastIP": null,
"identities": []
}