Защита BrainyCP от несанкционированного доступа
To connect via API, you need to create a host account in the Brainy dashboard:
go to the "Host accounts" section → fill in the fields in the "Add host account" section:
- Username;
- password;
- IP address;
- group (if there is no group, create it);
- tariff (if there is no tariff, create it);
- language;
- shell access;
- owner.
When creating a group, you must enable the "API access" and / or "Full API access (administrator)" parameter. The last parameter is responsible for adding administrative functions:
Go back to creating a host account and assign a group to the user who will be granted the API connection:
To connect via API, you need to open a new page in the browser and enter http://your-IP:8002/api/api.php?Login=username&pass=password in the address bar. If done correctly, you will see a blank page:
If you entered an incorrect username or password, an error {"code": 1, "message": "Not perm2"} will be displayed:
Other helpful articles: