# API Error: No authorization token was found

**URL:** <https://community.auth0.com/t/api-error-no-authorization-token-was-found/80391>\
**Category:** Get Help\
**Tags:** jwt, api, auth0\
**Created:** [March 23, 2022, 10:46am UTC](https://community.auth0.com/t/api-error-no-authorization-token-was-found/80391 "2022-03-23T10:46:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![abroadhurst](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/abroadhurst/32/31618_2.png) [@abroadhurst](https://community.auth0.com/u/abroadhurst)\
**Post date:** [March 23, 2022, 10:46am UTC](https://community.auth0.com/t/api-error-no-authorization-token-was-found/80391/1 "2022-03-23T10:46:22Z")

</div>

SDK: express-jwt & jwks-rsa  
Version: 4.17.3 & 2.0.5  
Platform: Node.js 6.14.15 & express 4.17.3

I am following the sdk sample provided in the getting started for node.js but I am getting an 401error that states that no authorization token can be found. I think it is related to this step:

> 1. Choose a JWT library
> 
> As your API will be parsing JWT formatted access tokens, you will need to setup these capabilities on your API.
> 
> You can navigate to [jwt.io](https://jwt.io/#libraries) and choose from there. Remember to pick a library that support your selected signing algorithm.

I have no idea what this step is asking me to do. Please can you help elaborate?

---

<div class="post-metadata">

**Author:** ![abroadhurst](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/abroadhurst/32/31618_2.png) [@abroadhurst](https://community.auth0.com/u/abroadhurst)\
**Post date:** [March 23, 2022, 4:43pm UTC](https://community.auth0.com/t/api-error-no-authorization-token-was-found/80391/2 "2022-03-23T16:43:06Z")

</div>

I tried copying one of the example sdks auth0 provides and just filling in the necessary information and I am still getting the same error.

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [March 28, 2022, 7:53pm UTC](https://community.auth0.com/t/api-error-no-authorization-token-was-found/80391/4 "2022-03-28T19:53:00Z")

</div>

Hi @abroadhurst!

Do you mind sharing the specific sample(s) you’ve been working with?

> [@abroadhurst](#):
>
> 401error that states that no authorization token can be found

It sounds like there is no Authorization header being included in the request and thus no authorization token - Basically, the middleware is checking to see if there is a valid Access Token included in the Authorization header, and in this case the header might be missing altogether.

For example, you can see this in action in our React sample:

```const
    try {
      const token = await getAccessTokenSilently();

      const response = await fetch(`${apiOrigin}/api/external`, {
        headers: {
          Authorization: `Bearer ${token}`,
        },
      }); 

```

This code + sample app can be found [here](https://github.com/auth0-samples/auth0-react-samples/blob/610c16ed3f1e764df2233c2e24d71ed0a40183a0/Sample-01/src/views/ExternalApi.js#L57).

Hope this helps!

---

<div class="post-metadata">

**Author:** ![Keanu](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/keanu/32/33313_2.png) [@Keanu](https://community.auth0.com/u/Keanu)\
**Post date:** [March 29, 2022, 7:41am UTC](https://community.auth0.com/t/api-error-no-authorization-token-was-found/80391/5 "2022-03-29T07:41:28Z")

</div>

> [@ty.frith](#):
>
> This code + sample app can be found [here](https://www.epayitonline.one/).

Yess thanks for sharing it that worked for me!

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [March 29, 2022, 10:02pm UTC](https://community.auth0.com/t/api-error-no-authorization-token-was-found/80391/6 "2022-03-29T22:02:34Z")

</div>

Awesome! Good to know - Thanks for confirming 😄

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [April 13, 2022, 10:02pm UTC](https://community.auth0.com/t/api-error-no-authorization-token-was-found/80391/7 "2022-04-13T22:02:46Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
