# API REQUEST : Cannot GET URL

**URL:** https://discourse.nodered.org/t/api-request-cannot-get-url/75120
**Category:** General
**Tags:** http-request
**Created:** [13 February 2023 15:48 UTC](https://discourse.nodered.org/t/api-request-cannot-get-url/75120 "2023-02-13T15:48:36Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Shakey7](https://avatars.discourse-cdn.com/v4/letter/s/ba9def/32.png) [@Shakey7](https://discourse.nodered.org/u/Shakey7)
#### Post date: [13 February 2023 15:48 UTC](https://discourse.nodered.org/t/api-request-cannot-get-url/75120/1 "2023-02-13T15:48:36Z")

</div>

Hi All,  
I wrote an HTTP EndPoint ([http://X.X.X.X:1880/api/blabla?BLIBLI=bloblo](http://X.X.X.X:1880/api/blabla?BLIBLI=bloblo))  
that works fine when I request it from the same NR instance with GET HTTP,  
it works fine also when I call it from another NR app running on another PC with another IP address,  
BUT it fails when when I call it from a REST API Client I got the response : cannot GET url ...  
and the HTTP Endpoint receives not request. It seems that the NR server isnot reachable, but port 1880 is open and responds to ping.

It must be a $\*%#" configuration somewhere in settings.js

Lots of thanks if anyone can give me a hand on this topic

Bernie

---

<div class="post-metadata">

### Author: ![ralphwetzel](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ralphwetzel/32/53713_2.png) [@ralphwetzel](https://discourse.nodered.org/u/ralphwetzel)
#### Post date: [13 February 2023 15:57 UTC](https://discourse.nodered.org/t/api-request-cannot-get-url/75120/2 "2023-02-13T15:57:55Z")

</div>

Hi!  
Have you considered [this](https://nodered.org/docs/user-guide/runtime/securing-node-red) and [this](https://nodered.org/docs/api/admin/oauth)?  
In short: You need to authenticate & have the adequate permissions defined to connect to Node-RED from external clients...

---

<div class="post-metadata">

### Author: ![Shakey7](https://avatars.discourse-cdn.com/v4/letter/s/ba9def/32.png) [@Shakey7](https://discourse.nodered.org/u/Shakey7)
#### Post date: [14 February 2023 09:26 UTC](https://discourse.nodered.org/t/api-request-cannot-get-url/75120/3 "2023-02-14T09:26:54Z")

</div>

Hi Ralph

Thax for your feedback  
SO I tried to get an Access Token that needs to be includfed in Authoriztion headers in the GET API REQUEST  
For that i use the command as it is mentionned in NR cookbook :  
curl [http://localhost:1880/auth/token](http://localhost:1880/auth/token) --data 'client\_id=node-red-admin&grant\_type=password&scope=\*&username=XXXX&password=XXXX'

but the response is negative  
Unauthorized'grant\_type' is not an internal or external command  
'scope' is not an internal command ....  
same for 'password'

what's the matter ?

Bernie

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [15 April 2023 09:27 UTC](https://discourse.nodered.org/t/api-request-cannot-get-url/75120/4 "2023-04-15T09:27:25Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
