# Placing API key in system.net.httpClient()

**URL:** <https://forum.inductiveautomation.com/t/placing-api-key-in-system-net-httpclient/57017>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [March 9, 2022, 3:51pm UTC](https://forum.inductiveautomation.com/t/placing-api-key-in-system-net-httpclient/57017 "2022-03-09T15:51:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prerak\_patel](https://avatars.discourse-cdn.com/v4/letter/p/e79b87/32.png) [@Prerak\_patel](https://forum.inductiveautomation.com/u/Prerak_patel)\
**Post date:** [March 9, 2022, 3:51pm UTC](https://forum.inductiveautomation.com/t/placing-api-key-in-system-net-httpclient/57017/1 "2022-03-09T15:51:37Z")

</div>

Hello,  
I posting data to the URL on the server. I am using client.post() for posting the data. They provided me API key. Where should I put this API key, should it be in username or password params?  
Can you share the example if you have used it?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [March 9, 2022, 3:53pm UTC](https://forum.inductiveautomation.com/t/placing-api-key-in-system-net-httpclient/57017/2 "2022-03-09T15:53:28Z")

</div>

This is something you should already know, or should have been told to you or been part of documentation.

Often it’s placed in a header with a certain name, but whether that’s true for this API and what that header might be you would need to find out.

---

<div class="post-metadata">

**Author:** ![Prerak\_patel](https://avatars.discourse-cdn.com/v4/letter/p/e79b87/32.png) [@Prerak\_patel](https://forum.inductiveautomation.com/u/Prerak_patel)\
**Post date:** [March 9, 2022, 4:00pm UTC](https://forum.inductiveautomation.com/t/placing-api-key-in-system-net-httpclient/57017/3 "2022-03-09T16:00:10Z")

</div>

Yes, they provide me Endpoint: and x-API-key:. But I don’t where to put in scripting.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [March 9, 2022, 4:14pm UTC](https://forum.inductiveautomation.com/t/placing-api-key-in-system-net-httpclient/57017/4 "2022-03-09T16:14:23Z")

</div>

See the documentation, under JythonHttpClient Methods \> Parameters. [system.net.httpClient - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/system.net.httpClient)

One of the optional parameters is a `headers` dictionary you can supply to the POST call.
