# Http request API works on script console but not

**URL:** <https://forum.inductiveautomation.com/t/http-request-api-works-on-script-console-but-not/44824>\
**Category:** Ignition\
**Created:** [March 23, 2021, 10:59pm UTC](https://forum.inductiveautomation.com/t/http-request-api-works-on-script-console-but-not/44824 "2021-03-23T22:59:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yfactor](https://avatars.discourse-cdn.com/v4/letter/y/e79b87/32.png) [@Yfactor](https://forum.inductiveautomation.com/u/Yfactor)\
**Post date:** [March 23, 2021, 10:59pm UTC](https://forum.inductiveautomation.com/t/http-request-api-works-on-script-console-but-not/44824/1 "2021-03-23T22:59:38Z")

</div>

Hi there,  
I ran a simple system.net.httpClient() with url and parameters.  
It worked when using a script console in designer but when I pasted the script to e.g. a button in a view or on gateway events and execute it, http connection will time out. What am i missing here?  
Thank you

 ![connection](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/5/85dacc9096e457df50ad4bc8fa840c50174c2635.png)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 23, 2021, 11:28pm UTC](https://forum.inductiveautomation.com/t/http-request-api-works-on-script-console-but-not/44824/2 "2021-03-23T23:28:55Z")

</div>

Windows gateway? Firewall perhaps. Or no network privileges for the gateway service.

---

<div class="post-metadata">

**Author:** ![Yfactor](https://avatars.discourse-cdn.com/v4/letter/y/e79b87/32.png) [@Yfactor](https://forum.inductiveautomation.com/u/Yfactor)\
**Post date:** [March 23, 2021, 11:36pm UTC](https://forum.inductiveautomation.com/t/http-request-api-works-on-script-console-but-not/44824/3 "2021-03-23T23:36:44Z")

</div>

@pturmel thank you for your help.  
Sorry our IT department is managing the server that ignition is installed and I have minimal knowledge about the network.  
Could you please explain why I get response when I execute on script console and not when I try to execute it on a e.g. component script or gateway script? And what shall I ask our IT department to look into if networking is the issue?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 23, 2021, 11:47pm UTC](https://forum.inductiveautomation.com/t/http-request-api-works-on-script-console-but-not/44824/4 "2021-03-23T23:47:35Z")

</div>

I don’t do much with windows servers, but default service accounts have historically had limited network permissions. Anything that runs in a tag event, gateway event, or Perspective script is actually running in the gateway’s service, and such limits would apply. The designer’s script console, like Vision clients, are running your script directly (local to your computer, not the gateway), and therefore get to use your normal client permissions for networking access (filesystem, too).

---

<div class="post-metadata">

**Author:** ![Yfactor](https://avatars.discourse-cdn.com/v4/letter/y/e79b87/32.png) [@Yfactor](https://forum.inductiveautomation.com/u/Yfactor)\
**Post date:** [March 24, 2021, 12:14am UTC](https://forum.inductiveautomation.com/t/http-request-api-works-on-script-console-but-not/44824/5 "2021-03-24T00:14:05Z")

</div>

Thank you for the explanation @pturmel.  
I tried it running on vision script and it worked. will contact our IT to check out the gateway permission.
