In the following example, we will show you how to create a new User using API.
Parameters
Each parameter has the name, value type, and optional description.
Parameter | Type | Description |
---|---|---|
User type | integer | Type of user account to create ; 1-user/pass, 2-login code |
Username | string | Customer username |
Password | string | Customer password |
MAC | string | AP MAC address |
InternetPlanID | integer | ID of the Internet plan |
Download | integer | Download rate limitation |
Upload | integer | Upload rate limitation |
UnlimitedQuota | boolean | Enable this option if you do not wish to limit users bandwidth quota |
Quota | integer | Total bandwidth traffic available to a user |
UnlimitedTime | boolean | Enable this option if you do not wish to limit users in time |
Timeleft | integer | Time left on the user account |
EnableExpire | boolean | Enable Expiration feature on the account |
Expire | string | Set expire date from the first login |
ExpireIn | integer | Configure the account to expire in X days, Y hours, and Z minutes |
Autologin | boolean | Enable Autologin feature for account |
Active | boolean | If it is selected, the price plan is active and can be used for account generating |
Multilogin | boolean | Enable Multilogin feature for account |
LoginsPerAccount | integer | Allows more than one user (device) to login with the same account |
DailyTim | integer | Total time available for Internet usage on a daily basis |
FirstName | string | Customer name |
LastName | string | Customer last name |
string | Customer email | |
Mobile | string | Customer mobile phone number |
ContactPermission | boolean | Ask users to accept or deny contact permission to comply with the GDPR consent requirements |
Address | string | Customer address |
City | string | Customer city |
Country | string | Customer country |
Postalcode | string | Customer postal code |
State | string | Customer state |
ProfileImageUrl | string | Customer image |
Gender | integer | Customer gender |
Birthday | string | Customer birthday |
CustomField1 | string | Configure custom fields based on your requirements |
CustomField2 | string | |
CustomField3 | string | |
Amount | integer | Price of the user account. If specified, it’s recorded in payments on first usage |
Sold | boolean | If amount is specified, account is marked as sold when added to payments |
Example
Login to your portal account and go to the API menu.
From the UserAPI section click on the Show/Hide to list all operations.
To create new User click GET/api/user/new.
Set Value in the Parameters section.
When you have entered the desired values click Try it out! button and the new user will be created.
Note: When InternetPlanId is set there is no need to enter other values, since it will be picked up from the selected Internet plan.