• Hello,

    Thank you for your plugin!
    I have a couple of questions.
    1. Is there a way to get a coords via HTTP POST (or get) for a specific track?
    2. I tried osmand to send coords via HTTP GET. It looks like it’s possible for admin only. Is that so? I tried
    other accounts with customers role with no luck. Could you please tell what docs to read on this matter?
    3. Is there a way to specify a trackname in the GET request for Osmand? I can see it’s format descripion in the trackserver options. But what’s the field name in the request?
    4. Also I tried the following
    domain/mapmytracks?request=get_activity&activity_id=9&from_time=0
    It asks for authentication although I’m sending the Bearer token in headers. What am I doing wrong here?

    Thank you for your time!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author tinuzz

    (@tinuzz)

    Hi,

    1. Yes, but only in specific fomats meant for internal use by Trackserver, and in GPX format. See https://github.com/tinuzz/wp-plugin-trackserver look for the [tslink] shortcode. All of these methods are protected with WP nonces, so it’s generally not possible to call those URLs from outside WordPress.

    2. To use Trackserver, the user needs the ‘use_trackserver’ capability, which is normally only given to admins and editors. For now, you would need to use a plugin like https://nl.www.ads-software.com/plugins/user-role-editor/ to add the capability to other roles. In the future, I might make that easy from within Trackserver.

    3. No. AFAIK, you would only be able to specify a static name in the URL in OsmAnd, so why not set it in Trackserver, and be done with it? At least you can have time-based trackname rotation then. You can always create a feature request on Github, if you need it!

    4. Trackserver doesn’t work with bearer tokens. If you use the MapMyTracks protocol, the use of HTTP Basic Auth is mandatory. I suspect you use a plugin for OAuth in WordPress, and Trackserver should recognize the validity of the token? I guess that would be doable, but the point is that Trackserver is made to work with specific clients, meaning that the MapMyTracks protocol implementation is made for OruxMaps’ client impementation, which doesn’t do OAuth. So there never was any reason to implement it that way.

    I hope this helps,
    Martijn.

    Thread Starter goblin193p

    (@goblin193p)

    Thank you for your prompt reply!

    2. It still says ‘access denied’. Do I need to set a separate access key for the account? How to do that?

    Thank you!

    Plugin Author tinuzz

    (@tinuzz)

    No, the MapMyTracks protocol is supposed to be used with the WordPress username and password.

    Does it work with a user that has the Adminstrator or Editor role?

    It just occurred to me: are your users internal WordPress users, or are they in some kind of external SSO? Since you mentioned bearer tokens… I don’t think that will work. Trackserver uses the WordPress function wp_check_password() to verify the password, and in principle that cannot work with SSO.

    Cheers,
    Martijn.

    Plugin Author tinuzz

    (@tinuzz)

    The next release of Trackserver will work differently: the access keys, that are already in use for TrackMe and other protocols, will work for all protocols. That way, they will work like ‘application passwords’ that you sometimes find in other applications that need to support clients that do not understand SSO protocols like oAuth. That will most likely solve your problem, but I need to ask for your patience, because it will take some more time for the next release to be ready.

    Martijn.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Trackserver (Osmand) HTTP get the tracks and using with multiple users’ is closed to new replies.