Register New User
POST/auth/v1/signup
Register New User, Applicable Scenarios:
- Register a new user with mobile number + verification code
- Register a new user with email + verification code
- Register a new user by obtaining the provider_token after third-party authorization.
You can set both the username and password during registration. Registering with only a username and password is not supported. To create a user with username and password, please go to the cloud console to create one.
Request
Query Parameters
The client ID corresponding to the application, which can be obtained from Cloud Development Platform --> Authentication --> Development Settings. Defaults to the environment ID and can be omitted.
Header Parameters
The device ID of the currently logged-in device. The client should randomly generate and cache this value. This parameter is related to the number of logged-in accounts.
- application/json
Body
Required when registering with email + verification_token
Required when registering with phone number + verification_token. The '+86' prefix cannot be omitted. Example: "+86 13000000000"
Length: 5-24 characters. Supports Chinese and English letters, digits, and special characters (only _ and -). Chinese characters are not supported.
Required when registering with phone number + verification_token or email + verification_token
The provider_token returned by interfaces such as /auth/v1/provider/token
Responses
- 200
- 400
A successful response.
Response Headers
- application/json
- Schema
- Example (from schema)
- Example
Schema
Always returns Bearer
Token used to access the Cloud Development HTTP API, with a maximum length of 4096 characters
When the access_token expires, it can be refreshed using the refresh_token to obtain a new access_token. The default expiration time is 31 days. Maximum length is 128 characters
Expiration time of the access_token in seconds
{
"token_type": "string",
"access_token": "string",
"refresh_token": "string",
"expires_in": 0,
"scope": "string",
"sub": "string",
"groups": [
"string"
]
}
{
"token_type": "Bearer",
"access_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjlkMWRjMzFlLWI0ZDAtNDQ4Yi1hNzZmLWIwY2M2M2Q4MTQ5OCJ9.eyJpc3MiOiJodHRwOi8vbG93Y29kZS01ZzlhYzIwdTJhMjdkYTQ2LmFwLXNoYW5naGFpLnRjYi1hcGkudGVuY2VudGNsb3VkYXBpLmNvbSIsInN1YiI6IjE4NzAwMTQxNjE5NTk2MjA2MDgiLCJhdWQiOiJBT0o4eUFBQnpOc01YZjBJY0tjIiwiZXhwIjoxNzM0Njg4Mjk0LCJpYXQiOjE3MzQ2ODEwOTQsImF0X2hhc2giOiJyLlBtazZMemNpUTJ5QktESWFONEFreGciLCJzY29wZSI6InVzZXIgc3NvIiwicHJvamVjdF9pZCI6Imxvd2NvZGUtNWc5YWMyMHUyYTI3ZGE0NiIsIm1ldGEiOnsid3hPcGVuSWQiOiIiLCJ3eFVuaW9uSWQiOiIifSwidXNlcl90eXBlIjoiIn0.lbSQ06kh5pe6PqRbGfm6tHZzj9stKDwYxpWqnjwALDx-DYqU-nOAPWQxXowEZGd-HwwsDbEi_eZfpxds4UO5rdmueMXCUxgMk9wf0fNRZe9KzOgdtmSq0H92pPjKAxskmZvzTLe4ftsAZmWLb-wUjATrk1RsGR4i9INeT9Ydprt-6vOdiJJQkLBDTBuiwdOQxge3md2rcnoM0L0VHwdCAIk1IfNZ4Dih9D77B34HPxdQdeAbppnS2SMFtjGAuvcwUVya3Lp8UFTNMrWO7S3ue4nOd35ns4tUc9cwB2LijNaBj4kYBHIjU8GFZCLuuSfGVj7EFnE2YFvlAU64aqvlYQ",
"refresh_token": "m.Y7Nk75cRMmeMrwYOqmG0Sju4YjZiiPRO-lE",
"expires_in": 7200,
"sub": "1870014161959620608"
}
- you can not signup just by username and password. Registration with only username and password is not allowed, and user identity must be verified.
- phone number login is disabled by admin, phone number login is not enabled and needs to be enabled on the CloudBase platform.
- you can not set phone number and email at same time, phone number and email cannot be set simultaneously.
Response Headers
- application/json
- Schema
- Example (from schema)
- Example
Schema
{
"error": "string",
"error_code": 0,
"error_description": "string"
}
{
"error": "unimplemented",
"error_code": 12,
"error_description": "you can not signup just by username and password"
}