# AuthHttpInterceptor doesn't add token to authorization header - Error 401 unauthorized - Angular

**URL:** <https://community.auth0.com/t/authhttpinterceptor-doesnt-add-token-to-authorization-header-error-401-unauthorized-angular/97652>\
**Category:** JWT.io\
**Tags:** api-gateway, jwt, api, authorization, access-token, angular, auth0\
**Created:** [January 6, 2023, 3:30pm UTC](https://community.auth0.com/t/authhttpinterceptor-doesnt-add-token-to-authorization-header-error-401-unauthorized-angular/97652 "2023-01-06T15:30:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![antonia7](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/antonia7/32/33385_2.png) [@antonia7](https://community.auth0.com/u/antonia7)\
**Post date:** [January 6, 2023, 3:30pm UTC](https://community.auth0.com/t/authhttpinterceptor-doesnt-add-token-to-authorization-header-error-401-unauthorized-angular/97652/1 "2023-01-06T15:30:56Z")

</div>

Hi everyone, I need help with a problem adding token to the authorization header in an Angular HttpClient call, the token doesn’t work and I get a 401 “unauthorized” error.

I followed this documentation to implement the interceptor:

[Call an API - Angular AuthHttpInterceptor](https://github.com/auth0/auth0-angular/blob/master/EXAMPLES.md#call-an-api)

I have an AWS API Gateway and a JWT authorizer in the routes. When I disable JWT it works fine and i get the data and when i a do postman test it works too, but when I add JWT to routes in API Gateway it doesn’t work and I get this 401 error. I think that the focus is in Auth0 configuration.  
If anyone knows what can i do, I would greatly appreciate it. Thank you.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [January 13, 2023, 2:32pm UTC](https://community.auth0.com/t/authhttpinterceptor-doesnt-add-token-to-authorization-header-error-401-unauthorized-angular/97652/3 "2023-01-13T14:32:27Z")

</div>

Hi @antonia7,

Are you seeing the access token in the request? You should be able to look at the _Network_ tab of DevTools and see what is going on.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 28, 2023, 1:24pm UTC](https://community.auth0.com/t/authhttpinterceptor-doesnt-add-token-to-authorization-header-error-401-unauthorized-angular/97652/5 "2023-03-28T13:24:17Z")

</div>

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