# API with ManagementJWT always return a 401 Unauthorized error

**URL:** <https://hub.mender.io/t/api-with-managementjwt-always-return-a-401-unauthorized-error/3139>\
**Category:** General Discussions\
**Created:** [January 27, 2021, 11:40am UTC](https://hub.mender.io/t/api-with-managementjwt-always-return-a-401-unauthorized-error/3139 "2021-01-27T11:40:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steve](https://avatars.discourse-cdn.com/v4/letter/s/f19dbf/32.png) [@Steve](https://hub.mender.io/u/Steve)\
**Post date:** [January 27, 2021, 11:40am UTC](https://hub.mender.io/t/api-with-managementjwt-always-return-a-401-unauthorized-error/3139/1 "2021-01-27T11:40:57Z")

</div>

Hi,

I’ve just installed the 2.6.0, and when I try to access an API with the ManagementJWT on Postman, it always return a 401 unauthorized error.  
For example, I have this error when I launch https://…/api/management/v1/inventory/devices?group=a\_group with a header Authorization : Bearer $ManagementJWT  
I have created a new ManagementJWT and it’s always the same.

Many thanks for your help.

Steve

---

<div class="post-metadata">

**Author:** ![Steve](https://avatars.discourse-cdn.com/v4/letter/s/f19dbf/32.png) [@Steve](https://hub.mender.io/u/Steve)\
**Post date:** [January 27, 2021, 1:31pm UTC](https://hub.mender.io/t/api-with-managementjwt-always-return-a-401-unauthorized-error/3139/2 "2021-01-27T13:31:29Z")

</div>

After many tests and reinstalling the 2.6.0, I try to add Bearer behind the ManagementJWT and it works.

Steve
