# 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:** 4

<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, 4:06pm UTC](https://hub.mender.io/t/device-api-authentication-request-for-receving-jwt-token-always-throwing-401-error/6442/4 "2024-01-09T16:06:02Z")

</div>

@vimoxshah

As the given tutorial describes, you need create a key pair yourself: [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)._
