# Http://localhost:1880/serialports

**URL:** <https://discourse.nodered.org/t/http-localhost-1880-serialports/93303>\
**Category:** General\
**Created:** [21 November 2024 05:34 UTC](https://discourse.nodered.org/t/http-localhost-1880-serialports/93303 "2024-11-21T05:34:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![yhur](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/yhur/32/84575_2.png) [@yhur](https://discourse.nodered.org/u/yhur)\
**Post date:** [21 November 2024 05:34 UTC](https://discourse.nodered.org/t/http-localhost-1880-serialports/93303/1 "2024-11-21T05:34:26Z")

</div>

Hello team,

[http://localhost:1880/serialports](http://localhost:1880/serialports) used to return the list of serial ports for the server. But it seems changed and returns 'Unauthorized' when called. I know it works on the editor page, but I need to call this API from a UI page.

What is the things to have it return the list of ports?

Thanks.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [21 November 2024 09:16 UTC](https://discourse.nodered.org/t/http-localhost-1880-serialports/93303/2 "2024-11-21T09:16:42Z")

</div>

When asking for help it is a good idea to provide information about your setup like

1. what device and OS are you running NR on?
2. what version of NR and node.js are you using? (you can get this from the node-red startup log)
3. are you using Docker or Home Assistant?
4. what browser are you using?
5. what user ID is used to run the command?

When I run that on my Mac, I get a reply in Safari, Firefox, Chrome and Brave  
`["/dev/tty.debug-console","/dev/tty.wlan-debug","/dev/tty.usbmodem1234561","/dev/tty.Bluetooth-Incoming-Port"]`

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [21 November 2024 13:54 UTC](https://discourse.nodered.org/t/http-localhost-1880-serialports/93303/3 "2024-11-21T13:54:50Z")

</div>

The serialports endpoint is an internal admin endpoint provided by the serial node.

So, you have to have the serialport node available on the palette.

But it is an ADMIN endpoint and secured with the same settings as you Editor web page.

It would be a serious security issue generally to make that list avail to the USER space rather than the ADMIN space.

But as long as you are aware of that issue. If you still want the list, you should probably create a small plugin or custom node to bridge the data. Alternatively, use an exec node to get the data from the OS and make that available as an endpoint using http-in/http-response nodes.

---

<div class="post-metadata">

**Author:** ![yhur](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/yhur/32/84575_2.png) [@yhur](https://discourse.nodered.org/u/yhur)\
**Post date:** [21 November 2024 14:23 UTC](https://discourse.nodered.org/t/http-localhost-1880-serialports/93303/4 "2024-11-21T14:23:50Z")

</div>

Thank you for your reply.

I'll provide those information for the next query if any.  
For now @TotallyInformation seems to point out the cause.

When I unset the security setting, it is back working again.

---

<div class="post-metadata">

**Author:** ![yhur](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/yhur/32/84575_2.png) [@yhur](https://discourse.nodered.org/u/yhur)\
**Post date:** [21 November 2024 14:26 UTC](https://discourse.nodered.org/t/http-localhost-1880-serialports/93303/5 "2024-11-21T14:26:32Z")

</div>

Thank you. What you pointed out is the cause.  
And yes, I understand the possible security issue. But the current scenario I'm working on is a local engineering web console for the serially attached equipments, so they can stay with those possibility.

---

<div class="post-metadata">

**Author:** ![yhur](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/yhur/32/84575_2.png) [@yhur](https://discourse.nodered.org/u/yhur)\
**Post date:** [21 November 2024 14:28 UTC](https://discourse.nodered.org/t/http-localhost-1880-serialports/93303/6 "2024-11-21T14:28:18Z")

</div>

I think it's okay to close now.

Thank you @zenofmud and @TotallyInformation again.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [21 November 2024 14:45 UTC](https://discourse.nodered.org/t/http-localhost-1880-serialports/93303/7 "2024-11-21T14:45:44Z")

</div>


