# Getting 403 with Amplify's API even though I'm signed in

**URL:** <https://discourse.sst.dev/t/getting-403-with-amplifys-api-even-though-im-signed-in/2257>\
**Category:** General\
**Created:** [December 26, 2020, 1:45am UTC](https://discourse.sst.dev/t/getting-403-with-amplifys-api-even-though-im-signed-in/2257 "2020-12-26T01:45:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ammarasmro](https://avatars.discourse-cdn.com/v4/letter/a/b77776/32.png) [@ammarasmro](https://discourse.sst.dev/u/ammarasmro)\
**Post date:** [December 26, 2020, 1:45am UTC](https://discourse.sst.dev/t/getting-403-with-amplifys-api-even-though-im-signed-in/2257/1 "2020-12-26T01:45:03Z")

</div>

Considering that I have included all the required portions to set a project up until running `Amplify.configure(....)` portion

When I run `Auth.signIn('email@domain.com', 'password')`. It is succeeding. When I take the retrieved access token and test it in the Cognito authorizer tester, it is succeeding. When I run `API.get('apiname', '/api/path/requiring/authentication')` It is failing. Sometimes with 403 and others with 401 codes. Am I missing something? Do I need to explicitly provide auth headers?

FYI  
If I remove the auth requirement in API gateway on the same paths, API.get… is working

---

<div class="post-metadata">

**Author:** ![jayair](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/jayair/32/9_2.png) [@jayair](https://discourse.sst.dev/u/jayair)\
**Post date:** [January 3, 2021, 1:07am UTC](https://discourse.sst.dev/t/getting-403-with-amplifys-api-even-though-im-signed-in/2257/2 "2021-01-03T01:07:01Z")

</div>

Have you tested your APIs using the CLI in this chapter?

> **[Test the APIs](https://serverless-stack.com/chapters/test-the-apis.html)**
>
> To test a serverless backend API secured using IAM and Cognito User Pool you need to follow a few steps. First, generate a user token by authenticating with the User Pool. Then use the user token to get a set of temporary IAM credentials using the...
