# Device API Authentication request for receving JWT token always throwing 401 error

**URL:** <https://hub.mender.io/t/device-api-authentication-request-for-receving-jwt-token-always-throwing-401-error/6442>\
**Category:** General Discussions\
**Tags:** api, management-api\
**Created:** [January 8, 2024, 5:29am UTC](https://hub.mender.io/t/device-api-authentication-request-for-receving-jwt-token-always-throwing-401-error/6442 "2024-01-08T05:29:47Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [January 9, 2024, 8:30am UTC](https://hub.mender.io/t/device-api-authentication-request-for-receving-jwt-token-always-throwing-401-error/6442/2 "2024-01-09T08:30:39Z")

</div>

Hi @vimoxshah,

According to the tutorial here, the `X-MEN-Signature` needs to be derived from a key pair: [How to write a custom client interfacing a Mender server](https://hub.mender.io/t/how-to-write-a-custom-client-interfacing-a-mender-server/1353#step-1-authentication-6)

Greetz,  
Josef

---

_[View the full topic](https://hub.mender.io/t/device-api-authentication-request-for-receving-jwt-token-always-throwing-401-error/6442)._
