# Notehub SDK authentication for Javascript

**URL:** <https://discuss.blues.com/t/notehub-sdk-authentication-for-javascript/2185>\
**Category:** Uncategorized\
**Created:** [June 21, 2024, 2:47pm UTC](https://discuss.blues.com/t/notehub-sdk-authentication-for-javascript/2185 "2024-06-21T14:47:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bkauf](https://avatars.discourse-cdn.com/v4/letter/b/b4bc9f/32.png) [@bkauf](https://discuss.blues.com/u/bkauf)\
**Post date:** [June 21, 2024, 2:47pm UTC](https://discuss.blues.com/t/notehub-sdk-authentication-for-javascript/2185/1 "2024-06-21T14:47:31Z")

</div>

I noticed the username/password authentication to the notehub API will be deprecated. I’m trying to reconfigure to use the client ID and secret via the Javascript SDK however I cannot seem to find any code examples. Is username / password this still the supported/ recomended method for the javascript SDK?

> **[Notehub JS Library Installation and Usage - Blues Developers](https://dev.blues.io/tools-and-sdks/notehub-sdks/notehub-js-library/)**
>
> Installation instructions, usage, and documentation for the Notehub JS npm library.

---

<div class="post-metadata">

**Author:** ![paigen11](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/paigen11/32/487_2.png) [@paigen11](https://discuss.blues.com/u/paigen11)\
**Post date:** [June 21, 2024, 2:58pm UTC](https://discuss.blues.com/t/notehub-sdk-authentication-for-javascript/2185/2 "2024-06-21T14:58:22Z")

</div>

Hi @bkauf ,

That’s a great question. The username/password combination is still supported and the recommended method for interacting with Notehub via Notehub JS.

We are currently in the process of updating our auth system (which will include how API authentication is handled) as I write this, and I hope that within the next quarter or so we’ll have a better solution that uses client IDs and secrets.

For now, if you’d like to use client IDs and secrets, Notehub JS accepts those as well, and another user provided a hand-rolled option you could try: [Previously generated API keys do not invalidate after 30 minutes nor after subsequent logins · Issue #42 · blues/notehub-js · GitHub](https://github.com/blues/notehub-js/issues/42#issuecomment-2161843897)

I apologize for not being more clear about that in our documentation, and hope this helps you in the meantime.

---

<div class="post-metadata">

**Author:** ![bkauf](https://avatars.discourse-cdn.com/v4/letter/b/b4bc9f/32.png) [@bkauf](https://discuss.blues.com/u/bkauf)\
**Post date:** [June 21, 2024, 3:01pm UTC](https://discuss.blues.com/t/notehub-sdk-authentication-for-javascript/2185/3 "2024-06-21T15:01:51Z")

</div>

Great thank you for the quick response. I’ll look at the example and see if I can get it working.
