Skip to content

Frequently Ask Questions

How to get client mac address?

To get the client device's MAC address, you can use the HttpApi.GetClientDevice method in your handler:

func (w http.ResponseWriter, r *http.Request) {
    clnt, err := api.Http().GetClientDevice(r)
    // handle error
    fmt.Println(clnt.MacAddr()) // print the mac address
}