Skip to main content

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 API
  • username: 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 API
  • username: 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

A successful response.

Response Headers