# How to get the refresh\_token with getAcessTokenSilently method from the Auth0 React SDK

**URL:** <https://community.auth0.com/t/how-to-get-the-refresh-token-with-getacesstokensilently-method-from-the-auth0-react-sdk/138514>\
**Category:** Get Help\
**Tags:** sdks-quickstarts, auth0-react\
**Created:** [July 10, 2024, 12:11am UTC](https://community.auth0.com/t/how-to-get-the-refresh-token-with-getacesstokensilently-method-from-the-auth0-react-sdk/138514 "2024-07-10T00:11:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cinnabams3782](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/cinnabams3782/32/49127_2.png) [@cinnabams3782](https://community.auth0.com/u/cinnabams3782)\
**Post date:** [July 10, 2024, 12:11am UTC](https://community.auth0.com/t/how-to-get-the-refresh-token-with-getacesstokensilently-method-from-the-auth0-react-sdk/138514/1 "2024-07-10T00:11:26Z")

</div>

Ready to post? 🔍 First, try searching for your answer.  
I need to access to the refresh\_token so I tried calling the `getAccessTokenSilently` method like this:

```auto
    getAccessTokenSilently({
      authorizationParams: {
        scope: 'openid offline_access',
        grant_type: 'refresh_token',
      },
      cacheMode: 'off',
      detailedResponse: true,
    })

```

I can see in the networks tab that `refresh_token` is returned in the payload, but for some reason, `getAccessTokenSilently` returns everything except `refresh_token`. Why?

---

<div class="post-metadata">

**Author:** ![remus.ivan](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/remus.ivan/32/68771_2.png) [@remus.ivan](https://community.auth0.com/u/remus.ivan)\
**Post date:** [March 27, 2025, 8:34pm UTC](https://community.auth0.com/t/how-to-get-the-refresh-token-with-getacesstokensilently-method-from-the-auth0-react-sdk/138514/4 "2025-03-27T20:34:54Z")

</div>

Hi @cinnabams3782,

Welcome to the Auth0 Community and sorry for the late reply.

You do not need to specify the `grant_type: 'refresh_token'` in order to use refresh tokens in the Auth-React SDK. You have correctly requested the offline\_access scope, and you also need to **allow offline access** from this [settings page](https://auth0.com/docs/get-started/apis/api-settings#access-settings) and set the useRefreshTokens: true from the [Auth0 Provider](https://auth0.github.io/auth0-react/interfaces/Auth0ProviderOptions.html), since the SDK will generate the Refresh Tokens automatically. I would recommend checking the [getAccessTokenSilently](https://auth0.github.io/auth0-react/interfaces/Auth0ContextInterface.html) documentation from the Auth0-React SDK.

I hope this helps your case, but others as well.  
Best regards,  
Remus

---

<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:** [April 10, 2025, 8:35pm UTC](https://community.auth0.com/t/how-to-get-the-refresh-token-with-getacesstokensilently-method-from-the-auth0-react-sdk/138514/5 "2025-04-10T20:35:20Z")

</div>

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