Тема: Create locator URL using Javacript API
Hi Everyone!
Im having problems trying to create a locator URL using Javascript API. There are a couple of similar questions on this forum, but they use Remote API... I need the solution for Javascript API.
This is what I have:
// get instance of current Session
var sess = wialon.core.Session.getInstance();
//Creating the token object
var token = {
userId : null,
h : null,
app : "testApp",
at : 0,
dur : 3600,
fl : 256,
p : "",
items : [18416637]
};
//Creating the token
sess.updateToken("create",token,
function (code) { // login callback
if (code){ msg(wialon.core.Errors.getErrorText(code)); return; } // exit if error code
});
This is all I have... and Im getting an error code 4 (Invalid Input)
The documentation Im using: https://sdk.wialon.com/api/index.html#w … hod_public
I really need help on this. Thanks in advice!