Jump to content


WEB API


  • Please log in to reply
18 replies to this topic

#1 Guest_travelmate_*

Guest_travelmate_*
  • Guests

Posted 16 January 2017 - 21:14 PM

Is there an API to embed a live trace within a website's frame / page ?

 

(Note : I'm well aware about the feature consisting in sharing a link to the last position on a map)

 

I'm talking about an API which would allow to share a full track (based on a day for example with colours based on speed).

 

Thanks!



#2 pach

pach

    Orange Guru

  • Members
  • PipPipPip
  • 4,502 posts
  • LocationBelarus

Posted 17 January 2017 - 05:17 AM

travelmate, the system supports Remote API.

use trc-api.wialon.com instead of host.


  • Charlesdwept, Raymondjic, Faxxzzamc and 3 others like this

I do not answer emails and personal messages|Я не отвечаю на личные сообщения и почту.


#3 Guest_travelmate_*

Guest_travelmate_*
  • Guests

Posted 24 January 2017 - 22:21 PM

travelmate, the system supports Remote API.

use trc-api.wialon.com instead of host.

Thank you very much, I'll look into that!

 

A bit difficult to start from nothing. Can I use the remote API with the wialon app trackplayer ?

 

--> https://github.com/w...app-trackplayer

 

Is there an example to start with to be used within a php website ?

 

Thank you very much to anyone who can put me on the right "track" :)



#4 pach

pach

    Orange Guru

  • Members
  • PipPipPip
  • 4,502 posts
  • LocationBelarus

Posted 25 January 2017 - 05:48 AM

travelmate, you can use the playground:

https://sdk.wialon.com/playground

And there are some examples in the docs.

 

Track Player is actually written on the Remote API  ;)


  • Charlesdwept, Raymondjic, Faxxzzamc and 3 others like this

I do not answer emails and personal messages|Я не отвечаю на личные сообщения и почту.


#5 Guest_travelmate_*

Guest_travelmate_*
  • Guests

Posted 25 January 2017 - 21:50 PM

Awesome, thank you Patch!



#6 Guest_synfield_*

Guest_synfield_*
  • Guests

Posted 23 April 2017 - 06:27 AM

Hi,
Would like to know if there is a GPS Tracer API available, to get gos coords from my supported device for use in an android app that I'm developing. Cheers

#7 pach

pach

    Orange Guru

  • Members
  • PipPipPip
  • 4,502 posts
  • LocationBelarus

Posted 26 April 2017 - 06:02 AM

synfield, check the post above.


  • Charlesdwept, Raymondjic, Faxxzzamc and 3 others like this

I do not answer emails and personal messages|Я не отвечаю на личные сообщения и почту.


#8 Guest_mauretecar_*

Guest_mauretecar_*
  • Guests

Posted 22 May 2017 - 12:43 PM

 ola não tou conseguindo adicionar o numero de telefone na plataforma alguém pode mim ajudar 



#9 Guest_lazlolosle_*

Guest_lazlolosle_*
  • Guests

Posted 22 May 2017 - 19:12 PM

Hi:

Can the API be used for GPS Trace free version or is this a feature only available for paid versions?

 

I´m just asking because I can´t get a token using the trc-api.wialon.com host and New Authorization way explained in the doc.

 

https://sdk.wialon.c...ref/login/login

Should the old method be used?

 

Thanks in advance.

 

 

 



#10 pach

pach

    Orange Guru

  • Members
  • PipPipPip
  • 4,502 posts
  • LocationBelarus

Posted 23 May 2017 - 06:42 AM

lazlolosle

http://orange.gps-trace.com/login.html?client_id=myapp&access_type=-1&activation_time=0&duration=2592000&lang=en&flags=0x1&user=pach&response_type=token

There is a way you can get a token.

https://trc-api.wialon.com/wialon/ajax.html?svc=token/login&params={"token":"xxx8a19e7af9a1929ad03a0f7bdf81d654307F85D318AC1FF540A32B6FE3D26913E47065"}

Then login using a token

{"host":"xxxx","eid":"xxx651b1cdc2cbbbb4a1fafa55eca034","au":"pach","tm":1495521521,"wsdk_version":"1.133","user":{"nm":"pach","cls":1,"id":12162880,"prp":{"dst":"-1","email":"shaleny03@gmail.com","evt_flags":"2","language":"en","locator":"1","loctok":"1423888004445","locup":"1","m_ml":"12","mbl_geolocation":"1","mbl_mp_type":"map_google","mbl_ui_visibility":"1","mbl_un_visibility":"1","mbl_ut_msg_params":"1","mbl_ut_sensors":"1","minimap_zoom_level":"15","monuv":"1","mps":"{}","msc":"1","muf":"11","otip":"0","radd":"{\"w\":\"6\",\"c\":0,\"u\":14776968,\"a\":1,\"td\":0,\"s\":\"default\",\"f\":0}","show_log":"1","shown":"15156038","sloc":"15156038","tz":"167848496","ud":"1","umap":"{\"baseLayer\":\"OSM,map\",\"overlays\":\"\",\"minimap\":false}","us_addr_fmt":"1255211008_10_5","used_hw":"{\"24\":1,\"96266\":1,\"248043\":1,\"275064\":3,\"11656488\":1,\"12082396\":1,\"13617993\":2}","ws":"2.6.9"},"crt":0,"bact":12162881,"mu":0,"ct":1412713356,"ftp":{"ch":0,"tp":0},"fl":36,"hm":"","ld":1495521521,"mapps":{},"mappsmax":0,"uacl":2146947},"token":"{\"app\":\"myapp\",\"ct\":1495519891,\"at\":1495519891,\"dur\":2592000,\"fl\":-1,\"p\":\"{}\",\"items\":[]}","th":"2d58a19e7af9a1929ad03a0f7bdf81d654307F85D318AC1FF540A32B6FE3D26913E47065","classes":{"avl_hw":4,"avl_resource":3,"avl_unit":2,"avl_unit_group":5,"user":1},"features":{"unlim":0,"svcs":{"allow_core_login":1,"avl_resource":0,"avl_unit":1,"create_units":1,"email_notification":1,"messages":1,"notifications":1,"pois":1,"sdk":1,"storage_user":0,"trace_mobile2":1,"trace_orange":1,"unit_commands":1,"wialon_activex":1,"wialon_mobile":1,"wialon_trace_api":1,"zones_library":1}}}

You will get a response where "eid" is the "sid" for a remoteAPI requests.


  • Charlesdwept, Raymondjic, Faxxzzamc and 2 others like this

I do not answer emails and personal messages|Я не отвечаю на личные сообщения и почту.


#11 Guest_DCombes_*

Guest_DCombes_*
  • Guests

Posted 26 October 2017 - 10:59 AM

Thanks for the pointer to the SDK - a great resource, but I'm struggling to find a simple means of getting the current position from the latest message using something like:

 

 
The error 4 response is really informative as to what I'm doing wrong!
 
Thanks!

  • Charlesdwept, Raymondjic, Faxxzzamc and 2 others like this

#12 pach

pach

    Orange Guru

  • Members
  • PipPipPip
  • 4,502 posts
  • LocationBelarus

Posted 26 October 2017 - 11:41 AM

DCombes, use Code to paste api requests. The forum engine thinks it is a link and cuts it.


  • Charlesdwept, Raymondjic, Faxxzzamc and 2 others like this

I do not answer emails and personal messages|Я не отвечаю на личные сообщения и почту.


#13 Guest_DCombes_*

Guest_DCombes_*
  • Guests

Posted 26 October 2017 - 11:54 AM

Here's the URL as code:

https://trc-api.wial...nt":4294967295}
  • Charlesdwept, Raymondjic, Faxxzzamc and 2 others like this

#14 Guest_DCombes_*

Guest_DCombes_*
  • Guests

Posted 26 October 2017 - 11:56 AM

try again removing obvious URL components:

trc-api.wialon.com/wialon/ajax.html?sid=mysid&svc=messages/get_messages&params={"indexFrom":0,"indexTo":999999,"timeFrom":0,"timeTo":100,"filter":"","flags":0,"flagsMask":0,"loadCount":4294967295}
  • Raymondjic, Faxxzzamc, Rogeradory and 1 other like this

#15 pach

pach

    Orange Guru

  • Members
  • PipPipPip
  • 4,502 posts
  • LocationBelarus

Posted 26 October 2017 - 14:16 PM

DCombes, you are trying to point out some forum issues while can not resolve api errors?

I am sorry but I thought you are trying to show off.

 

There are some tools you can use to paste code to make life brither:

trc-api.wialon.com/wialon/ajax.html?sid=mysid&svc=messages/get_messages&params={"indexFrom":0,"indexTo":999999,"timeFrom":0,"timeTo":100,"filter":"","flags":0,"flagsMask":0,"loadCount":4294967295} 

error 4 = invalid input = mistake in your syntax

 

Anyway if you now unit item id you could have used search by id with some flags:

https://trc-api.wialon.com/wialon/ajax.html?svc=core/search_item&params={"id":15156038,"flags":1024}&sid=

In this case you will receive last known position of a unit.

 

Otherwise you need to load messages first:

https://trc-api.wialon.com/wialon/ajax.html?svc=messages/load_interval&params={"itemId":15156038,"timeFrom":1490681851,"timeTo":1490683994,"flags":1,"flagsMask":65281,"loadCount":1}&sid=

Then pull them by using messages/get_messages&

And only then search for the last one.

 

You can also increase "loadCount" value in the "messages/load_interval&" if you want to simply get all messages for the time interval.

 

Or use Load last message.


  • Charlesdwept, Raymondjic, Faxxzzamc and 2 others like this

I do not answer emails and personal messages|Я не отвечаю на личные сообщения и почту.


#16 Guest_DCombes_*

Guest_DCombes_*
  • Guests

Posted 29 October 2017 - 01:25 AM

Hi,

I've moved on to using the wialon/python package on Ubuntu (https://github.com/w...n/python-wialon), but am struggling to see how I can get the token in the first place using python script.

 

How do I do that first step of entering the username & password to get the token?!?  I tried using the 'requests' package (https://github.com/requests) to post my credentials to the orange.gps-trace.com/index.html page, but I suspect that it doesn't work because that method has been deprecated.

 

I appreciate this isn't exactly a GPS-trace/ wialon problem, but any suggestions would be gratefully received - many thanks.


  • Raymondjic, Faxxzzamc, Rogeradory and 1 other like this

#17 pach

pach

    Orange Guru

  • Members
  • PipPipPip
  • 4,502 posts
  • LocationBelarus

Posted 01 November 2017 - 08:21 AM

DCombes, in this post I gave an example how a token can be generated.

Basically this is what you need to do first and only then you will get a sid.

Below is the manual with the details.

Attached Files


  • Raymondjic, Faxxzzamc, Rogeradory and 1 other like this

I do not answer emails and personal messages|Я не отвечаю на личные сообщения и почту.


#18 Guest_DCombes_*

Guest_DCombes_*
  • Guests

Posted 17 November 2017 - 15:46 PM

Thanks for that pach.

 

I got there in the end with a combination of ubuntu, cacti, php/wialon and homegrown php scripts working with a token captured from a manual login/ authentication process with redirect to my own php page, which stored the token for use by the cacti polling scripts. 

 

As a result, I am now successfully performing real-time monitoring of my father's personal tracker for activity levels, distance from home, speed of travel, battery level, etc, without having to drill into information on the gps-trace website.

 

Thanks again.


  • Raymondjic, Faxxzzamc, Rogeradory and 1 other like this

#19 pach

pach

    Orange Guru

  • Members
  • PipPipPip
  • 4,502 posts
  • LocationBelarus

Posted 20 November 2017 - 05:40 AM

DCombes, glad to hear that. Now you need a mobile app  ;)


  • Faxxzzamc, Rogeradory and Marcomayob like this

I do not answer emails and personal messages|Я не отвечаю на личные сообщения и почту.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users