I'm writing a script which gets the MAC address of the devices connected to a router. My understanding is that I can do this by triggering the /api/port-scan endpoint on the RMS API, and then using the provided channel I can query the status using HTTP at the /status/channel/<CHANNEL> endpoint.
I can successfully trigger a port-scan - getting back a "success": "true" message with a channel name. But when I do an HTTP request to the status endpoint, I get back an "UNAUTHORIZED" code.
curl 'https://rms.teltonika-networks.com/status/<CHANNEL>' -H 'authorization: Bearer <TOKEN>'
using a Personal Access Token I've made in RMS with all the possible permissions. And I get back:
Is this a problem with the HTTP endpoint, my access token or my request structure?
I've also tried to connect to the status interface via socket.io with no luck - using the examples given in the API documentation tends to report an error due to HTTP code 200. Do you have a working example of this written in js?