10

Is it possible to get a device's telephony ID, MAC Address, serial number, and/or Android ID through a mobile website?

That is, not through a downloadable app, but through a link that the user goes to in the browser on their mobile device?

If so, how?

Kalina
  • 5,504
  • 16
  • 64
  • 101
  • 1
    I don't think this is possible, mostly due to privacy/tracking reasons. The best you could do is get the UserAgent – Bryan Denny Dec 19 '12 at 17:58
  • What is the UserAgent? Is that available via an app as well? Basically, I need a way to get the same unique(ish) identifier via website and via app. – Kalina Dec 19 '12 at 18:02
  • For the website, you could perhaps use the IP address. At any given instance, it is unique. However, it will change everytime the user connects to a different network, or restarts his/her current network. – Raghav Sood Dec 19 '12 at 18:05
  • 1
    The user agent tells you what kind of browser/device they are viewing the page with http://en.wikipedia.org/wiki/User_agent – Bryan Denny Dec 19 '12 at 18:05
  • @Kalina I know this is an extremely old question, but is there any way of doing this now? This is something that I'd like to use to stitch user journeys across a website and an app for non-logged-in users. – emptyjayy Jan 03 '20 at 11:24

2 Answers2

5

No, this is not possible. Even for native apps, device identity information is safeguarded behind the READ_PHONE_STATE permission.

As websites cannot request permissions, you cannot retrieve this information outside of an app.

Raghav Sood
  • 81,899
  • 22
  • 187
  • 195
1

You said you need a unique(ish) ID on a website.

Look into UserAgents: http://en.wikipedia.org/wiki/User_agent which will tell you what kind of device/browser is viewing your webpage

And you can also retrieve the IP address of the user, which may change in future requests to your website.

You could also attempt to store a cookie, but the user may delete their cookies at any time.

For specifics on how to get these, it depends on what your web site is built with.

Bryan Denny
  • 27,363
  • 32
  • 109
  • 125
  • Thanks! IP address and cookies are out, because I need a more persistent identifier that is also consistent between the mobile app and the mobile website. I will look into UserAgents. – Kalina Dec 19 '12 at 18:10
  • 3
    @TheBeatlemaniac Just note that a UserAgent will look something like this: `Mozilla/5.0 (Linux; U; Android 4.0.4; en-us; SCH-I535 4G Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30;` you could possibly have multiple users with the same UserAgent if they use the same phone and browser and OS – Bryan Denny Dec 19 '12 at 18:12