# Unable to connect through nodejs library

**URL:** <https://forum.asana.com/t/unable-to-connect-through-nodejs-library/31130>\
**Category:** API & Developers\
**Tags:** api\
**Created:** [14 September 2018 13:44 UTC](https://forum.asana.com/t/unable-to-connect-through-nodejs-library/31130 "2018-09-14T13:44:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Siva\_Subramanian](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/siva_subramanian/32/9593_2.png) [@Siva\_Subramanian](https://forum.asana.com/u/Siva_Subramanian)\
**Post date:** [14 September 2018 13:44 UTC](https://forum.asana.com/t/unable-to-connect-through-nodejs-library/31130/1 "2018-09-14T13:44:27Z")

</div>

I use Asana node js library and i’m able to login via oauth and get bearer\_token and refresh\_token.  
But i can’t make any further request, I’m getting the following error  
"Unable to verify userError: No Authorization "

---

<div class="post-metadata">

**Author:** ![Bastien\_Siebman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/bastien_siebman/32/172354_2.png) [@Bastien\_Siebman](https://forum.asana.com/u/Bastien_Siebman)\
**Post date:** [14 September 2018 14:17 UTC](https://forum.asana.com/t/unable-to-connect-through-nodejs-library/31130/2 "2018-09-14T14:17:16Z")

</div>

Are you passing the token you obtained in the requests? Sorry if that seems a dumb question, I am playing the rubber duck!

---

<div class="post-metadata">

**Author:** ![Joe\_Trollo](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/joe_trollo/32/4025_2.png) [@Joe\_Trollo](https://forum.asana.com/u/Joe_Trollo)\
**Post date:** [14 September 2018 18:32 UTC](https://forum.asana.com/t/unable-to-connect-through-nodejs-library/31130/3 "2018-09-14T18:32:05Z")

</div>

Hi @Siva_Subramanian, can you confirm that you’re on the latest version of our Node client library? v0.16.0 had [a bug](https://github.com/Asana/node-asana/issues/164) in it that prevented authentication, which was then fixed in [v0.16.1](https://www.npmjs.com/package/asana/v/0.16.1).

---

<div class="post-metadata">

**Author:** ![Siva\_Subramanian](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/siva_subramanian/32/9593_2.png) [@Siva\_Subramanian](https://forum.asana.com/u/Siva_Subramanian)\
**Post date:** [17 September 2018 03:59 UTC](https://forum.asana.com/t/unable-to-connect-through-nodejs-library/31130/4 "2018-09-17T03:59:37Z")

</div>

Yes i’m using v0.16.1  
I use CLIENT.app.accessTokenFromCode to authenticate, and then i use [CLIENT.users.me](http://CLIENT.users.me)() and i couldn’t get any results

---

<div class="post-metadata">

**Author:** ![Joe\_Trollo](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/joe_trollo/32/4025_2.png) [@Joe\_Trollo](https://forum.asana.com/u/Joe_Trollo)\
**Post date:** [18 September 2018 00:42 UTC](https://forum.asana.com/t/unable-to-connect-through-nodejs-library/31130/5 "2018-09-18T00:42:42Z")

</div>

Can you share a minimum piece of code that exhibits this error?

My next guess based on your last reply (and building off @Bastien_Siebman’s reply) is this: The `accessTokenFromCode` method does not save the OAuth access token to the client. Rather, the return value is the OAuth access token and refresh token, which you need to save and give to the client yourself on subsequent requests. Calling `CLIENT.app.accessTokenFromCode(...)` and then immediately calling `CLIENT.users.me()` will not send any authorization header in the request.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/system/32/276370_2.png) [@system](https://forum.asana.com/u/system)\
**Post date:** [30 May 2025 19:08 UTC](https://forum.asana.com/t/unable-to-connect-through-nodejs-library/31130/6 "2025-05-30T19:08:21Z")

</div>


