How do I get an bluetooth id of a device that opens my site

I need to get a Bluetooth address of a device that is connecting to my site. Here is a couple of questions:

  1. Can it be achieved with Bluetooth API only? If not, which way could I use to do what I described above?
  2. About that API. Let’s imagine a situation. I have a phone. Bluetooth is turned on. I’m visiting my website and I need to get BT address of my phone. Could this code work out:
const button = document.querySelector('#the-button');
button.addEventListener('click', function() {
    navigator.bluetooth.requestDevice({
        filters: [{
            services: ['battery_service']
        }]
    }).then(device => {
        console.log('Got device:', device.name);
        console.log('id:', device.id);
    });
});

I can’t understand if I have to connect my phone to another device or all I have to do is using the above code. So, generally, there are 2 questions I want to ask: 1. Are there any other ways to get BT address of a device besides Bluetooth API? 2. How many devices do I need to use BT API?

Kinda out of my depth, but I checked the actual bluetooth request part in web console and it works just fine, so long as the device in question is displaying the battery service. It opens a little bluetooth pair interface in Chrome where you find and pair to your device. For development testing only, you can change this if you’re having problems finding the device.

{filters: [{services: ['battery_service']}]}

to

{acceptAllDevices: true}

But if all you need is to grab the device ID, that works, I believe. If you need to interact with the device you’ll probably want to actually connect to its GATT server.
Sorry I can’t be more help.