Register New User
POST/auth/v1/signup
Register new user, supports the following three registration scenarios:
1. Phone Number + Verification Code Registration
Input Requirements:
phone_number: Phone number (required, format: "+86 13000000000")verification_token: Verification code token (required), obtained from Verify SMS/Email Verification Code APIusername: Username (optional, 2-48 characters)password: Password (optional)
Output:
- Returns standard token response (access_token, refresh_token, etc.)
Phone Number + Verification Code Registration Request Example
{
"phone_number": "+86 13000000000",
"verification_token": "your_verification_token",
"username": "user123",
"password": "Password@123"
}
Phone Number + Verification Code Registration Response Example
{
"token_type": "Bearer",
"access_token": "your_access_token",
"refresh_token": "m.xY9zA1bC2dE3fG4hI5jK6lM7nO8pQ9rS0tU1vW2xY3zA4bC5dE6fG7hI8jK9lM0nO1pQ2rS3tU4vW5",
"expires_in": 7200,
"sub": "9876543210123456789"
}
2. Email + Verification Code Registration
Input Requirements:
email: Email address (required)verification_token: Verification code token (required), obtained from Verify SMS/Email Verification Code APIusername: Username (optional, 5-24 characters)password: Password (optional)
Output:
- Returns standard token response (access_token, refresh_token, etc.)
Email + Verification Code Registration Request Example
{
"email": "user@example",
"verification_token": "your_verification_token",
"username": "user456",
"password": "DemoPass123!@#"
}
Email + Verification Code Registration Response Example
{
"token_type": "Bearer",
"access_token": "your_access_token",
"refresh_token": "m.xY9zA1bC2dE3fG4hI5jK6lM7nO8pQ9rS0tU1vW2xY3zA4bC5dE6fG7hI8jK9lM0nO1pQ2rS3tU4vW5",
"expires_in": 7200,
"sub": "9876543210123456789"
}
3. Third-party Authorization Registration
Input Requirements:
provider_token: Third-party identity source token (required)username: Username (optional, 5-24 characters)password: Password (optional)
Output:
- Returns standard token response (access_token, refresh_token, etc.)
Third-party Authorization Registration Request Example
{
"provider_token": "your_provider_token",
"username": "github_user",
"password": "SamplePass456$%^"
}
Third-party Authorization Registration Response Example
{
"token_type": "Bearer",
"access_token": "your_access_token",
"refresh_token": "m.xY9zA1bC2dE3fG4hI5jK6lM7nO8pQ9rS0tU1vW2xY3zA4bC5dE6fG7hI8jK9lM0nO1pQ2rS3tU4vW5",
"expires_in": 7200,
"sub": "9876543210123456789"
}
General Notes:
- Can set username and password during registration
- For verification code registration, need to obtain verification_token from Verify SMS/Email Verification Code API
- Registration with only username and password is not supported. For username/password user creation, please go to cloud backend
Request
Responses
- 200
- 400
A successful response.
Response Headers
- you can not signup just by username and password, registration with only username and password is not allowed, user identity needs to be verified
- phone number login is disabled by admin, phone number login is not enabled, needs to be enabled on the Cloud Development Platform
- you can not set phone number and email at same time, phone number and email cannot be set simultaneously