# How to get a new Google access\_token using refresh\_token

**URL:** <https://community.auth0.com/t/how-to-get-a-new-google-access-token-using-refresh-token/7813>\
**Category:** Get Help\
**Tags:** google, refresh-tokens\
**Created:** [August 10, 2017, 11:13pm UTC](https://community.auth0.com/t/how-to-get-a-new-google-access-token-using-refresh-token/7813 "2017-08-10T23:13:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![simon.berube](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@simon.berube](https://community.auth0.com/u/simon.berube)\
**Post date:** [August 10, 2017, 11:13pm UTC](https://community.auth0.com/t/how-to-get-a-new-google-access-token-using-refresh-token/7813/1 "2017-08-10T23:13:00Z")

</div>

Hi,

Our scenario is really simple. We want to use Google as the IdP and we have a SPA and a backend service that need to call an external Google API.

_ **How is it possible to get a refresh token from Google without using Lock0? I didn’t find any documentation about this. Do I need to pass the access\_offline scope and Auth0 will handle the thing for me?** _

Afterward, I think that the plan is partially clear

1. Store the refresh token in app\_metadata using a predefined Auth0 rules
2. In the backend, call the ManagementAPI to get the Google access\_token (in identities) and refresh\_token (in app\_metadata)

After those steps :

**Option 1**

Do I use the access\_token in identities to make the call to the external Google API and only get a new access\_token when the call fails

**Option 2**

Or, do I simply get a new access\_token using the refresh\_token and store those access\_token in a cache backend and validate the expiration myself? If the same user returns and is token did not expired I reuse it, otherwise I get a new access\_token.

_ **Which of these options is better?** _

Last question : _ **How do I use the Google refresh\_token to get a new access\_token?** _ I use the Auth0 API ([Authentication API - Auth0 Docs](https://auth0.com/docs/api/authentication#refresh-token)) or the Google OAuth API?

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:** [March 2, 2018, 5:55am UTC](https://community.auth0.com/t/how-to-get-a-new-google-access-token-using-refresh-token/7813/2 "2018-03-02T05:55:52Z")

</div>


