I am creating an API using Node Express and mongoDB. I want to get user's MAC address when they are using the given URL.
I used the following code but it returns the server's MAC address where the API runs. I want the different different MAC for various users.
ex :
user1 >> http://localhost:5000/api/getMacAddress //get user1's MAC address
user2 >> http://localhost:5000/api/getMacAddress //get user2's MAC address
var address = require('address');
address(function (err, addrs) {
console.log(addrs.ip, addrs.ipv6, addrs.mac);
// '192.168.0.2', 'fe80::7aca:39ff:feb0:e67d', '78:ca:39:b0:e6:7d'
});