1

Pass user token from my own wialon app to our hosting server

(edited by Fadi Ramzi 20/01/2019 14:22:02)

Topic: Pass user token from my own wialon app to our hosting server

Hello,
i want to develop an web app tool for our customers
i am gonna to use js sdk and add this web app in apps section in wialon system to make the users open it like other apps( offline ,dashboard , echo driving)
so basically i need to pass  user token to my hosting server when user click on app icon from apps section
to use token in my js code as following :

var token = 'passed token from wialon when user clicked on app icon';
  session.loginToken(token, function(code) {
    console.log(code);
  });

so how can i do that?
can i get token with _GET in my php code or  another way?

thanks

2

Pass user token from my own wialon app to our hosting server

Re: Pass user token from my own wialon app to our hosting server

In the apps configurator, there is Advanced URL parameters.

And it doesn't have token option.

I'll recommend to use Authorize hash (it will be avalable in _GET params as authHash), then:

session.loginAuthHash(authHash, function(...

After login, if you need token, you can call session.updateToken.