1

Wialon js library createUser issue

(edited by arsalanqayum332 21/08/2020 22:11:01)

Topic: Wialon js library createUser issue

Hello everyone, from last week I am stuck in creating user using wialon API. But continuesly I am getting an exception which exhausted me.I want to share code snippet.

Token:
8d5383cf8a10d84eb2b876d1ac6143d20F65AA4C13D7D3C3E7FDB070D058A75FA22009A1

Here is code snippet:

var sess = wialon.core.Session.getInstance(); // get instance of current Session
        var user = wialon.core.Session.getInstance().getCurrUser(); // get current user
         
        wialon.core.Remote.getInstance().remoteCall('core/create_user',{"creatorId":user.getId(),"name":'testing_use',"password":'password',"dataFlags":5});

All screenshot attached.Kindly take a look.It always return error code 6. Gurtam document represent with unknown error.

2

Wialon js library createUser issue

Re: Wialon js library createUser issue

Hello!

Error 6 often means the billing or hierarchy issue or not access right via token.
The user don't have possibility to create element, or his parent user. The required service is disactivated.
You can try to create user from web site, if it's successful , it's ok with billings.
Also please check your token access right - to create elements it needs to use token with full access

Diana Cheley
Wialon Hosting Expert
Gurtam
3

Wialon js library createUser issue

(edited by arsalanqayum332 17/06/2021 10:26:56)

Re: Wialon js library createUser issue

We appreciate the help, this was helpful.The main issue which was encounter because of token generated with invalid access level.I tried with token which have full access So the code works.