How to generate refresh token from script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-26-2021 09:46 AM
Hello All,
I setup OAuth with an external client and created a REST message. created a script include to check whether there is any existing refresh token, if the refresh token is not expired then looks for access token and validates whether it expired or not. If not expired then makes a REST call. If the Access Token expires, then I am generating a new one with the help of refresh token.
But, I am struck at generating Refresh Token when it is expired.
I need a way to generate Refresh token through script without manually generating from REST Message 'Get OAuth Token' related links.
Can someone please help about how to generate Refresh Token through script?
Below is the script i created for generating Access Token, but not sure how to generate for Refresh token.
Thanks,
Pooja
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-26-2021 01:33 PM
Hi Pooja,
This is a below script link that I found for a refresh token from Google API
https://developers.google.com/google-ads/scripts/docs/examples/generate-oauth20-refresh-token
Check this if it helps you in do changes accordingly.
I hope this will help you.
Mark ✅ Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks & Regards
Tejas Tamboli
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-29-2021 02:17 PM
I have the same issue. The Google API above is not helping.
Can someone help with this?