# Empty Payload when calling getAccessTokenSilently

**URL:** <https://community.auth0.com/t/empty-payload-when-calling-getaccesstokensilently/114825>\
**Category:** Get Help\
**Created:** [August 29, 2023, 2:41pm UTC](https://community.auth0.com/t/empty-payload-when-calling-getaccesstokensilently/114825 "2023-08-29T14:41:24Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![skfabc](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@skfabc](https://community.auth0.com/u/skfabc)\
**Post date:** [August 29, 2023, 2:41pm UTC](https://community.auth0.com/t/empty-payload-when-calling-getaccesstokensilently/114825/1 "2023-08-29T14:41:24Z")

</div>

Hello, I’m getting an empty payload in the token returned from getAccessTokenSilently.

I am setting the audience parameter and have confirmed its value as well as the value for scope.

Can someone help me understand what’s going wrong? Below is the code.

Thank You!

useEffect(() =\> {  
(async () =\> {  
try {  
const token = await getAccessTokenSilently({  
authorizationParams: {  
audience: ‘[https://api.shawnapp.systems/](https://api.shawnapp.systems/)’,  
scope: ‘openid profile email offline\_access’,  
}  
});

```
            const response = await fetch('https://shawnprod.shawn.auth0.com/userinfo', {
                headers: {
                Authorization: `Bearer ${token}`,
                },
            });
            setPosts(await response.json());
        } 
        catch (e) {
            console.error(e);
        }
    })();
}, [getAccessTokenSilently]);

```

---

<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:** [August 29, 2023, 3:27pm UTC](https://community.auth0.com/t/empty-payload-when-calling-getaccesstokensilently/114825/2 "2023-08-29T15:27:56Z")

</div>

Hey there @skfabc welcome to the community!

What does the access token look like when decoded at [jwt.io](http://jwt.io)? Is the audience param you’re passing the exact same as the API identifier listed under the API registered in Auth0?

Keep us posted!

---

<div class="post-metadata">

**Author:** ![skfabc](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@skfabc](https://community.auth0.com/u/skfabc)\
**Post date:** [August 30, 2023, 3:16pm UTC](https://community.auth0.com/t/empty-payload-when-calling-getaccesstokensilently/114825/4 "2023-08-30T15:16:04Z")

</div>

Hi, @ty.frith ,

I’ve confirmed that the audience param I’m passing is exactly the same as in Auth0. I DM’ed you the access token screen in [jwt.io](http://jwt.io).

Thanks!

---

<div class="post-metadata">

**Author:** ![bagulm123](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@bagulm123](https://community.auth0.com/u/bagulm123)\
**Post date:** [August 30, 2023, 3:38pm UTC](https://community.auth0.com/t/empty-payload-when-calling-getaccesstokensilently/114825/5 "2023-08-30T15:38:41Z")

</div>

I am also facing exact same issue with react18, react-router-6 and “@auth0/auth0-react”: “^2.2.1”

I am passing audience too

---

<div class="post-metadata">

**Author:** ![skfabc](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@skfabc](https://community.auth0.com/u/skfabc)\
**Post date:** [September 7, 2023, 12:59pm UTC](https://community.auth0.com/t/empty-payload-when-calling-getaccesstokensilently/114825/6 "2023-09-07T12:59:28Z")

</div>

UPDATE: The issue I was having was due to the way we’d configured Auth0 between two different tenants. Not a coding issue.

---

<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:** [September 7, 2023, 11:59pm UTC](https://community.auth0.com/t/empty-payload-when-calling-getaccesstokensilently/114825/7 "2023-09-07T23:59:44Z")

</div>

Hey @skfabc thanks for the update! Glad you were able to get this sorted 🙏

---

<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:** [September 8, 2023, 12:00am UTC](https://community.auth0.com/t/empty-payload-when-calling-getaccesstokensilently/114825/8 "2023-09-08T00:00:34Z")

</div>

Hey there @bagulm123 ! Are you still experiencing the same issue? If so, I recommend opening a new topic with as much detail as you can provide.

Thanks!

---

<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:** [September 22, 2023, 12:01am UTC](https://community.auth0.com/t/empty-payload-when-calling-getaccesstokensilently/114825/9 "2023-09-22T00:01:23Z")

</div>

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