Skip to main content
Question

How to refresh OAuth tokens for Google’s API?

  • December 25, 2021
  • 3 replies
  • 1039 views

Hello, 

I am trying to translate the actions inside https://developers.google.com/identity/protocols/oauth2/

to grab the refresh token and or the access token.

 

I have crafted my API and it works firing off a request with a pre worked out authorisation bearer. but obviously this only lasts 60 minutes before you need to get a new access token.

 

I spent a few days researching and trying to do this myself but kept coming up short.

 

I noticed there was a similar post 

which looks to be using OAuthv1 methods and an article 

https://platform.zapier.com/docs/oauth

But still with all of this information I was unable to understand how to create the tokens.

Anyone able to assist me in this please? 

 

Thanks in advance

Did this topic help you find an answer to your question?
67% found this helpful
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

3 replies

SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • 7289 replies
  • December 29, 2021

Hey @KristianL, welcome to the Community!

This section of our developer platform gives details of how to access and refresh tokens via OAuth v2: 

Add Access Token Request and Refresh Token Request URLs

Hopefully that will help to point you in the right direction! :)


  • New
  • 3 replies
  • January 6, 2022
KristianL wrote:

Hello, 

I am trying to translate the actions inside https://developers.google.com/identity/protocols/oauth2/

to grab the refresh token and or the access token.

 

I have crafted my API and it works firing off a request with a pre worked out authorisation bearer. but obviously this only lasts 60 minutes before you need to get a new access token.

 

I spent a few days researching and trying to do this myself but kept coming up short.

 

I noticed there was a similar post 

https://community.zapier.com/developer-discussion-13/trouble-getting-google-api-refresh-token-for-custom-integration-2145

which looks to be using OAuthv1 methods and an article 

https://platform.zapier.com/docs/oauth

But still with all of this information I was unable to understand how to create the tokens.

Anyone able to assist me in this please? 

 

Thanks in advance

Hi follow this way, make sure you are passing same parameters as it is, your token will be refreshed

 

 

 

 

 


  • Author
  • Beginner
  • 1 reply
  • January 6, 2022

Solved it. There was a zapier developer section. I was looking in the normal section and thats what confused me :).