Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How can i get unique device id or Mac address with device API?

ANSWERED

I looking for Device API to query unique id such as serial number or MAC address of Fitbit Ionic, Can anyone suggest to do that?

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

There isn't currently a method for uniquely identifying a user or device. You'd need to have them authenticate against your own oauth service.

View best answer in original post

Best Answer
0 Votes
6 REPLIES 6

There isn't currently a method for uniquely identifying a user or device. You'd need to have them authenticate against your own oauth service.

Best Answer
0 Votes

Hi,

 

I was just exploring Device API and found one thing. I can get device info using two ways. once is Device API and another is Web API.

 

#1 using device API

    import { me as device } from "device";

    console.log("model ID: " + device.modelId);

It gives me modelID 27

 

#2 using Web API

    https://api.fitbit.com/1/user/-/devices.json

It gives me "id": "527737188"

 

I am using Ionic. Now I am not sure which is unique device ID which I can use to uniquily identify each ionic watch?? Can I use any of above ID as unique identifier per device ??

 

Hoping to get reply on this sooner.

 

Thanks.

 

Best Answer
0 Votes
#1 is a model ID so you cannot use it for unique ID for every users cause
of it possible users use the same product model (in this case is Ionic
model)

#2 it’s a unique user ID but not device ID.the user I’d is ID your user
account on Fitbit platform. But if you use this ID instantly device ID, so
probably it not unique ID if that user have more one Ionic watch
Best Answer
0 Votes

Hi,

Thanks for the quick response. 

for #2, how it can be User ID ? full object what I am getting using Device API is as below:

[
  {
    "battery": "Medium",
    "batteryLevel": 45,
    "deviceVersion": "Ionic",
    "features": [],
    "id": "527737188",
    "lastSyncTime": "2018-11-26T17:52:20.722",
    "mac": "F542468E84FA",
    "type": "TRACKER"
  }
]

I guess this api gives list of all devices connected with a user's account. In this case I have only one device connected which is Ionic. so it gives me ID of that. So is this ID unique for each device ?

 

Also please let me know if you know a way to identify user from any web api. I need to authenticate user and need to perform some activity based on unique user ID. I am not getting any unique detail while making OAuth api call. Please let me know if you know anything about it.

 

Thanks in advance.

Best Answer
0 Votes
Hi,

#2 web API that you can query to get user ID, means you can use it for
identify user or identify device in case you have ONLY One Ionic.

Thanks
Seksit
Best Answer
0 Votes

Hi,

 

Thanks for the response.

So I am calling API https://api.fitbit.com/1/user/-/devices.json which gives me list of all devices connected with my account. In my case I only ahve one Ionic so it gives me only one record. and that ID which I am getting is unique for each watch. is that what you mean?

Also if I have two Ionic linked to my account then each will have a different ID?

 

Just checkign if I can use this ID to uniquely identify each device against user.

 

Thanks.

Best Answer
0 Votes