Question

How to refresh OAuth tokens for Google’s API?

  • 25 December 2021
  • 3 replies
  • 767 views

Userlevel 1

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


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

Userlevel 1

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

 

 

Userlevel 1

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

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

 

 

 

 

 

Userlevel 7
Badge +11

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! :)