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 multiple accounts

Create multiple accounts

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

To avoid timeout requests and to make it easier to track results, please only create a maximum of 100 accounts in one query. The time interval between queries to create multiple accounts should be at least 10 minutes to avoid the case of too many queries that overload the server. Note: Each item in the users parameter needs to follow this structure.

Query Parameters

Name
Type
Description

token

string

Token xác thực tài khoản của bạn

Request Body

Name
Type
Description

users

array

An array that includes the information about the accounts you want to create.

// Response Code "00". The API will return an array of users and their status.
// Return data:
    "respCode": "00",
    "users": [
        {
            "name": "Nguyễn Văn A",
            "username": "nguyenvana",
            "email": "nguyenvana@abc.com",
            "password": "1234567890",
            "userId": null,
            "success": false,
            "status": "Email already in use"
        },
        {
            "name": "Lê Việt B",
            "username": "levietb",
            "email": "levietb@abc.com",
            "password": "1234567890",
            "userId": "msnJmaPa7KmtEzz3q",
            "success": true,
            "status": "Success created"
        },
        {
            "name": "Nguyễn Văn C",
            "username": "nguyenvanc",
            "email": "nguyenvan@abc.com",
            "password": "1234567890",
            "userId": "urs2vByNw9ETg9XYZ",
            "success": true,
            "status": "Success created"
        },
        {
            "name": "Trần Xuân D",
            "username": "tranxuand",
            "email": "tr@abc.com",
            "password": "1234567890",
            "userId": "MPC5B5dsdYD9Ak283",
            "success": true,
            "status": "Success created"
        },
        {
            "name": "Phạm Văn E",
            "username": "phamvane",
            "email": "phamvane@abc.com",
            "password": "1234567890",
            "userId": "cc95fXX5PTX5qDR9R",
            "success": true,
            "status": "Success created"
        },
        {
            "username": "nguyenxuanq",
            "email": "nguyenxuanq@abc.com",
            "password": "1234567890",
            "userId": null,
            "success": false,
            "status": "Not enough required infomation to create new user"
        },
        {
            "username": "lexuank",
            "email": "lexuank@abc.com",
            "userId": null,
            "success": false,
            "status": "Not enough required infomation to create new user"
        }
    ],
    "msg": "4 success, 3 error"
}
// Response Code "02". No request body.
// Return data:
{
    "respCode": "02",
    "users": null,
    "msg": "No request body"
}


// Response Code "03". No user is provided in request body.
{
    "respCode": "03",
    "users": null,
    "msg": "No users array in request body"
}


// Response Code "04". User parameter in the body is not an array.
// Return data:
{
    "respCode": "04",
    "users": null,
    "msg": "Users parammeter in body is not array format"
}


// Response Code "05". User parameter is an empty array.
// Return data:
{
    "respCode": "05",
    "users": null,
    "msg": "User parammeter is an empty array"
}

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


// Response Code "13". Every account you want to create has already existed, or server error.
// Return data:
    "respCode": "13",
    "users": [
        {
            name: "Nguyễn Văn A",
            username: "nguyenvaa",
            email: "nguyenvana@abc.com",
            password: "1234567890",
            userId: null,
            success: false,
            status: "Email already in use"
        },
        {
            name: "Trần Văn A",
            username: "nguyenvaa",
            email: "tranvanb@abc.com",
            password: "1234567890",
            userId: null,
            success: false,
            status: "Username already in use"
        },
        {
            name: "Phạm Văn C",
            email: "phamvanc@abc.com",
            userId: null,
            success: false,
            status: "Not enough required infomation to create new user"
        },
        {
            email: "levand@abc.com",
            password: "1234567890",
            userId: null,
            success: false,
            status: "Not enough required infomation to create new user"
        },
        {
            name: "Hoàng Văn F",
            username: "hoangvanf",
            email: "hoangvanf@abc.com",
            password: "1234567890",
            userId: null,
            success: false,
            status: "Server error in create new use"
        },      
    ],
    "msg": "0 success, 4 error"
}
// Response Code "08". Token is invalid or has expired.
// Return data:
{
    "respCode": "08",
    "users": null,
    "msg": "Invalid token || Token has expired"
}
// Response Code "10". Your account is not authorized to perform the query.
// Return data:
{
    "respCode": "10",
    "users": null,
    "msg": "Your account does not have permission"
}


// Response Code "11". The server has reached the maximum number of accounts.
// Return data:
{
    "respCode": "11",
    "users": null,    
    "msg": "The number of accounts has run out"
}


// Response Code "12". The available slots of account is not sufficient.
{
    "respCode": "12",
    "users": null,
    "msg": "There are only 3 available accounts"
}
// Response Code "01". Wrong request method.
// Return data:
{
    "respCode": "01",
    "users": null,
    "msg": "Request method should be POST"
}
// Response Code "07". Server not able to authenticate your account.
// Return data:
{
    "respCode": "07",
    "users": null,
    "msg": "Server not able to authenticate your account"
}


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

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

Path Parameters

Name
Type
Description

string

Your account is not authorized to perform the query, or the server has reached the maximum number of accounts

Example:

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

body: {
    users: [
        {
            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"
        },
        {
            name: "Lê Việt B",
            username: "levietb",
            email: "levietb@abc.com",
            password: "1234567890",
            phone: "0987654321",
            city: "Hà Nội",
            district: "Quận Ba Đình",
            street: "60 Điện Biên Phủ",
            gender: "Nam",
            job: "Lái xe"
        },
        {
            name: "Nguyễn Lan Hương",
            username: "nguyenlanhuong",
            email: "nguyenalanhuong@abc.com",
            password: "1234567890",
            phone: "0987654321",
            city: "Hà Nội",
            district: "Quận Thanh Xuân",
            street: "130 Nguyễn Trãi",
            gender: "Nữ",
            job: "Chuyên viên văn "
        },
        {
            name: "Trần Xuân D",
            username: "tranxuand",
            email: "tr@abc.com",
            password: "1234567890"
        },
        {
            name: "Phạm Văn E",
            username: "phamvane",
            email: "phamvane@abc.com",
            password: "1234567890"
        }
    ]
}

PreviousCreate an accountNextGet a course's information

Last updated 3 years ago

Was this helpful?