Lat long not returned in lastsession from REST API

Hello. I’m trying to find out my device’s timezone.

I could do this by tearing down my VPN and using the hologram modem location command or the Python SDK equivalent. But it is very very slow, and are not 100% reliable-- sometimes they get stuck and just won’t work for me until I do something drastic like rebooting.

I tried using a reverse IP lookup on your address, and that’s failing too-- apparently the internet thinks all the hologram devices are on the Isle of Jersey.

So now I’m trying via the REST API. From my Linux device, I do:
curl https://dashboard.hologram.io/api/1/devices/

And I get back a JSON object which contains a lastsession, but there’s no lat and long there. It just has (replacing identifying info with “…”)
“lastsession”: {
“linkid”: “412700”,
“bytes”: “0”,
“session_begin”: “2018-12-04 03:08:46”,
“session_end”: “0000-00-00 00:00:00”,
“imei”: “…”,
“cellid”: “…”,
“tadig”: “USAW6”,
“lac”: “…”,
“network_name”: “T-Mobile USA, Inc”
}

Previous messages here imply that there should be lat and long lines here.

Alternative suggestions are welcome too.

Right now we only return the location on single calls so if you do /devices/id then it will work.
We’re working on adding this to bulk calls in the near future

Sorry, I just omitted the device ID, org and API key, it was there, and I still don’t get lat/long.

Are you on the pro plan?

Yes. This is the modem “hub08” device Id 164021

Hmm, so you’re actually making a call to the URL: /devices/<deviceid> ?
I’m able to see location info on there

Yes, that’s what I did.

What happens if you stick ?orgid=<orgid> at the end of the URL where orgid is the org for that specific device?
Might have a bug where it’s looking at the wrong org for proplan

So, I see a “personal org id” and that may not be the same as the full org id. What I’m actually concerned about is that I only want to ship a restricted user’s credentials on the units so if one is stolen, they can’t go commissioning or decommissioning our other modems or anything crazy. As an experiment, I’ll try our full org ID later on.

If there’s no security solution to keep the credentials sane, I might have to implement from our backend, but I’d prefer not to…

Use the orgid that the dashboard says when you go to “Organization Settings.” It’s also listed on the device output there. You shouldn’t have to do that though. We’ll take a look and see if there’s a bug.

Definitely understand about the security concerns. Might make sense to create different orgs for everyone or we have some user permissions that might help.

Feel free to reach out to our support email at support@hologram.io and we might be able to help with your specific use case. I think we’ve helped customers in a similar situation.

I’ve tried both the “personal org ID” and the graftworx org ID, and both of them work, and neither one gets me lat/long. I’ve verified it’s on the professional plan. Is there anything else I can try? Or is there something else you can do from your end?

Thanks,
– Jim

Hey Jim,

I took a look at your Personal Org and noticed that that wasn’t on the professional plan. Since the API Key is linked to that it seems like that was what was missing. I tested getting location for your organization and it works for me. Can you please confirm that its working on your end.

Best,
Maiky

Hi Jim,
That bug is now fixed so you should be able to see location on any org with a pro plan regardless of whether your personal has the pro plan.
BTW, little mistake in @Maiky’s post above. The API keys are tied to your user and so your one key can get to all orgs that you have access to.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.