Search code examples
browserweb-push

Identify web push notification device from endpoint url


Is there a way to identify the browser based on web-push-notification endpoint url?

I would like to add a list of endpoints to the user settings page, so he could see what devices are connected and remove the ones that he does not need, but all I have is the endpoint (and auth data) in format like this one:

https://fcm.googleapis.com/fcm/send/fIoxgVbEb3Q:APA91bHN_ryToq_Oe6QQa-pO__uKoLjv2LJSI_8YxvqSN2j8UUHUxH8wTnOOHJdBq252baM3bkIXqRBp529GctrxLqF_A_K9R-5pnIL0jFw6f4p7yQq_Lp2AbNyPRyidU3JHwdmuI11p

I would like to convert it to something like:

  • Chrome on Samsung Galaxy 8
  • Firefox on Windows 7
  • Internet Explorer on IPhone 6

Is there any way I could do it, or do I need to collect this data in advance? I know I can get the browser form domain, but is there any list that contains all of the possibilities?


Solution

  • I think there's no way to do this without collecting information in advance.

    The domain will be the same for the same browser on different platforms.