Hoola.vn
English
English
  • Introduction
  • Register and Set up your Website
  • Design your Online E-learning Website
  • GUIDE FOR STUDENTS: Create a student account
  • GUIDE FOR STUDENTS: Buy/Receive courses
  • Manage Content
    • Courses
      • Create your own courses 101
      • Live Lessons
      • How to display courses on your website
    • Tags
    • Topics
    • Teachers
    • Library
    • Activation Codes
    • Subpages
  • Manage Accounts
    • Accounts
    • Roles and Decentralization
  • Manage Orders
    • All Orders
    • Manage Calls
    • Distribute Calls
  • Marketing
    • Discount
    • Email for Marketing
    • Popup
  • Affiliate
    • Set up Affiliate in your courses
    • Manage Affiliate
  • Statistics
    • General Statistics
    • Students
    • Orders
    • Courses
    • Active Users
    • Revenue
  • Certificate
    • Certificate Templates
    • Issued Certificates
  • Customer Support
    • Activation Code
    • Bank Transfer Code
    • Discussion
    • Testimonial
    • Notification
  • Website Preview
  • Manage Blog
  • Display Setting
    • Menu
      • Logo
    • Homepage
      • Hero Banner
      • Partners - Customers
      • Testimonials
    • List of Courses Page
    • Classroom
    • Footer
    • Advertisement
  • System Setting
    • Setup
      • Change colors of your website
    • Authentication
      • Registration
      • Number of devices allowed per account
      • Login via Social Media
        • Set up a project in Google Cloud Platform
        • Set up an app in Facebook for Developers
      • Share accounts
      • Policies and Terms of Service
    • Payment Methods
    • Email
      • Set up Automatic System Email
      • Create and Use App Password
    • Plugin
    • Domain
  • Website's Resources
    • General Information
    • Status
    • In-use Service Packages
  • API
    • Login
    • My Account
    • Get an account's information
    • Get multiple accounts' information
    • Search accounts
    • Count Accounts
    • Create an account
    • Create multiple accounts
    • Get a course's information
    • Get multiple courses' information
    • Search course
    • Count courses
    • Add a course to a user
    • Add multiple courses to multiple users
    • Remove a course from a user
Powered by GitBook
On this page

Was this helpful?

  1. API

Create an account

Create an account

POST https://abc.hoola.vn/manage/api/users/create-single-user

Note: To avoid too many queries leading to server overload, the time interval between each query to create an account should be at least 5 seconds

Query Parameters

Name
Type
Description

token

string

Account Authentication Token

Request Body

Name
Type
Description

job

string

Job Title

gender

string

Gender

street

string

Street

district

string

District

city

string

City

phone

string

Phone

name

string

Full name in string format and has at least 3 characters

username

string

Username in string format with no space and special character and a length of 3 to 20 characters

email

string

Email

password

string

Password with a length of 6 to 35 characters

// Response Code "00". Create an account successfully.
// Return data:
{
    "respCode": "00",
    "user": {
        "userId": "zKpEoZmyDwMP9gtGr",
        "name": "Nguyễn Văn A",
        "username": "nguyenvana",
        "email": "nguyenvana@abc.com",
        "status": "Success created"
    },
    "msg": "Create user success"
}
// Response Code "02". No request body.
// Return data:
{
    "respCode": "02",
    "user": null,
    "msg": "No request body"
}


// Response Code "03". No name in request body.
// Return data:
{
    "respCode": "03",
    "user": null,
    "msg": "No name in request body"
}



// Response Code "04". No name in request body.
// Return data:
{
    "respCode": "04",
    "user": null,
    "msg": "No name in request body"
}


// Response Code "05". No name in request body.
// Return data:
{
    "respCode": "05",
    "user": null,
    "msg": "No name in request body"
}


// Response Code "06". No password in request body.
// Return data:
{
    "respCode": "06",
    "user": null,
    "msg": "No password in request body"
}


// Response Code "07". No token provided.
// Return data:
{
    "respCode": "07",
    "user": null,
    "msg": "No token"
}


// Response Code "13". Email already in use.
// Return data:
{
    "respCode": "13",
    "user": null,
    "msg": "Email already in use"
}


// Response Code "14". Username already in use.
// Return data:
{
    "respCode": "14",
    "user": null,
    "msg": "Username already in use"
}
// Response Code "09". Token is invalid or has expired.
// Return data:
{
    "respCode": "09",
    "user": null,
    "msg": "Invalid token || Token has expired"
}
// Response Code "10". Your account is not authorized to perform the query.
// Return data:
{
    "respCode": "10",
    "user": null,
    "msg": "Your account does not have permission"
}


// Response Code "12". The server has reached the maximum number of accounts.
// Return data:
{
    "respCode": "12",
    "user": null,
    "msg": "The number of accounts has run out"
}
// Response Code "01". Wrong request method.
// Return data: 
{
    "respCode": "01",
    "user": null,
    "msg": "Request method should be POST"
}
// Response Code "08". Server not able to authenticate your account.
// Return data: 
    "respCode": "08",
    "user": null,
    "msg": "Server not able to authenticate your account"
}


// Response Code "11". Server is not able to check your website resources.
// Return data: 
{
    "respCode": "11",
    "user": null,
    "msg": "Server is not able to check your website resources"
}


// Response Code "15". Server is not able to create new user.
// Return data: 
{
    "respCode": "15",
    "user": null,
    "msg": "Server is not able to create new user"
}

Example:

// POST:
https://abc.hoola.vn/manage/api/users/create-single-user?token=sdhg23797sdbv9186jdvk58

body: {
    name: "Nguyễn Văn A",
    username: "nguyenvana",
    email: "nguyenvana@abc.com",
    password: "1234567890",
    phone: "0987654321",
    city: "Hà Nội",
    district: "Quận Cầu Giấy",
    street: "40 Hoàng Đạo Thuý",
    gender: "Nam",
    job: "Giáo viên THCS"
}

PreviousCount AccountsNextCreate multiple accounts

Last updated 3 years ago

Was this helpful?