76

Discussion of new authorization method (oAuth)

Re: Discussion of new authorization method (oAuth)

NTS, do you still have problems with invalid tokens? For more details You can provide user name and invalid token example (private message).

Head of Wialon Local Department
Gurtam
77

Discussion of new authorization method (oAuth)

Re: Discussion of new authorization method (oAuth)

Hi everyone

May you explain css_url parameters under new authorization method in both advanced and simplified modes?
Please explain below parameters under simplified mode as well (i can't understand them in doc, please give me an example of usage):
1. cms_url
2. lite_url
3. mobile_url
4. title
5. demo_url

78

Discussion of new authorization method (oAuth)

Re: Discussion of new authorization method (oAuth)

Hello, hhamedk.
Optional parameter css_url is for custom styling of simple and advances login forms (if You need to change colors, fonts, sizes etc). You can pass an url to externally hosted css file into this paramter.
As for other extra parameters (cms_url, lite_url, mobile_url, title, demo_url) see example here:
https://sdk.wialon.com/playground/demo/ … imple_form
With the help of cms_url (and cms_title - CMS Manager), lite_url (and lite_title - Wialon Lite), mobile_url (and mobile_title - Wialon Mobile) You can specify additional Wialon sites to be shown as links after login. You can login to these sites with one click - newly generated token will be used.
By default only one link to Monitoring site will be shown after login, and with the help of title parameter You can specify the name of this site.
If demo_url and demo_title parameters are passed - additional link is shown at the bottom of simple login form. This link gives ability for user to examine some site (e.g. Wialon Hosting) without entering any login and password. Format of demo_url should be like this: http://hosting.wialon.com/?token=<token> .

Head of Wialon Local Department
Gurtam
79

Discussion of new authorization method (oAuth)

Re: Discussion of new authorization method (oAuth)

Thanks for the detailed instruction.

What I can add here is that you need to set the proper flags to authorize the session ID to do as intended.

-1 is unlimited and good for beta testing, be careful when using this in production.

https://sdk.wialon.com/wiki/en/sidebar/ … cess_flags

80

Discussion of new authorization method (oAuth)

Re: Discussion of new authorization method (oAuth)

Hi, can anyone help , from where to get the resource ids? to pass in create/update/delete token function.

81

Discussion of new authorization method (oAuth)

Re: Discussion of new authorization method (oAuth)

farith, hello. When you create token and skip or leave empty "items" parameter - token will have access to all items (including resources) that current user has. If you need to grant access to only specific items - you can initially execute core/search_items request with "itemsType" set to "avl_resource" and "flags" set to 1. As a result you'll get list of resources and then you can pass their ids to token/update request into "items" parameter.

Head of Wialon Local Department
Gurtam
82

Discussion of new authorization method (oAuth)

Re: Discussion of new authorization method (oAuth)

hello,

i have some problem to get the token id with the new authorization ways, always failed less than 15 minute. so the monitoringscript to get the data stop also.
currently, re-login form to get the new token, but its wasting time

let me know, who was same the problem and solution. thanks
ohiya, i use wialon local 1704

  • Discussion of new authorization method (oAuth)
83

Discussion of new authorization method (oAuth)

Re: Discussion of new authorization method (oAuth)

Error 7 on searching item by ID

I have used below command after getting eid
https://hst-api.wialon.com/wialon/ajax. … b24aa7xxxx

But i am getting error 7



I have cretaed token with -1 flags
Not sure why my acees is denied

Can you please help?

84

Discussion of new authorization method (oAuth)

Re: Discussion of new authorization method (oAuth)

siju, hello. May be you are trying to search for item that doesn't belong to you or you doesn't access to.
You can write pm with item id and your username to check this.

Head of Wialon Local Department
Gurtam
85

Discussion of new authorization method (oAuth)

Re: Discussion of new authorization method (oAuth)

Interesting, very interesting ( Gurtam wants me to reply to 3 topics before creating one... )

86

Discussion of new authorization method (oAuth)

Re: Discussion of new authorization method (oAuth)

Stuff... (I just need to reply to 3 different topics before being allowed to create one myself.)

87

Discussion of new authorization method (oAuth)

(edited by Ivoiretic@2018 01/02/2019 11:33:53)

Re: Discussion of new authorization method (oAuth)

Hello dear developers,
I have several wialon accounts and I would like you to help me get an API key and then get GPS data in JSON format. Until now the support is not able to give me a satifaisante answer.
Thank you for wanting to help me.

88

Discussion of new authorization method (oAuth)

(edited by clue 04/08/2020 22:10:26)

Re: Discussion of new authorization method (oAuth)

Hi. We can successfully get a token when we visit https://hosting.wialon.com/login.html using a browser.  However we would like to do so programatically.

I tried doing so using Postman and calling this URL:
https://hosting.wialon.com/login.html?l … p;app=Clue

and then passing the Password in Body using x-www-form-urlencoded, as key Password or password or passw, however none of these worked.

Is there a way to pass the password in the request, so that Wialon returns the token?

If you can please send a screenshot of a working implementation in Postman or a Postman collection that would be superb, otherwise any help here would be appreciated too.
Thanks.