# 401 Unauthorized when using Gateway API

**URL:** <https://forum.inductiveautomation.com/t/401-unauthorized-when-using-gateway-api/117190>\
**Category:** Ignition\
**Created:** [September 25, 2026, 5:17pm UTC](https://forum.inductiveautomation.com/t/401-unauthorized-when-using-gateway-api/117190 "2026-09-25T17:17:55Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![darwin](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@darwin](https://forum.inductiveautomation.com/u/darwin)\
**Post date:** [September 25, 2026, 5:30pm UTC](https://forum.inductiveautomation.com/t/401-unauthorized-when-using-gateway-api/117190/2 "2026-09-25T17:30:39Z")

</div>

This looks like it could be an instance of this problem:

> [@Selecting Security Level in API Key not working 8.3.8](https://forum.inductiveautomation.com/t/selecting-security-level-in-api-key-not-working-8-3-8/116689/3):
>
> What collection (or Deployment Mode) was the Security Level created in? What collection or mode is the Gateway currently in? API Key creation only knows about Security Levels in the current mode of the Gateway. If you've created levels in some other collection/mode, you need to apply them during EDITING of the API Key. This is a limitation of the UI because we can't know about the levels of the other collections/modes until the user tells us to look in those collections/modes, but the first ave…

I have ran into issues on my own gateways where a deployment mode is set before I create the API Key. Usually the way I solve this is creating the key in the core collection (or whatever collection you've defined the additional security levels read permissions in) and then editing and assigning it roles after creation.

---

_[View the full topic](https://forum.inductiveautomation.com/t/401-unauthorized-when-using-gateway-api/117190)._
