Oauth 2.0 for Google Api

Post your questions and help other users.

Moderator: Martin

Post Reply
Posts: 3
Joined: 10 Nov 2017 20:03

Oauth 2.0 for Google Api

Post by GhostTheToast » 09 Sep 2019 20:40


I'm trying to setup a flow where I can enter data points that I would like to track and have it append to a google sheet in my drive. I have been going about this with an 'HTTP Request' action, but I'm getting an error about not being able to certify who I am. Any advice or help would be appreciated.

Thank you

User avatar
Posts: 2599
Joined: 21 Jul 2017 17:50

Re: Oauth 2.0 for Google Api

Post by Desmanto » 10 Sep 2019 06:12

Is it a must to append directly to google sheet? Why don't just save it to glovar first or text file first? And later once in a while, open this text file, open google sheet in browser and append it manually.

Other method is to download the file from the gdrive (search google drive action), append the text and and upload it back. But this only work for text file too, not spreadsheet file, except csv.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Posts: 369
Joined: 24 Jan 2015 02:06

Re: Oauth 2.0 for Google Api

Post by anuraag » 10 Sep 2019 06:54

You will need a access_token to do http request. I have requested Martin to implement http auth (like tasker's recent feature) in Automagic a month ago.

Easy way to get access_token is to use Autoweb plugin. IAP costs ~$4.

Other method is to get client_id and client_secret from console.developers.google.com and send a post request to https://www.googleapis.com/oauth2/v4/token. I have implemented this method to get my access_token which i use to sync my files to google drive.

Edit: here is steps to generate access_token.
https://medium.com/@pablo127/google-api ... 03c897fd98
You will need one more step to renew access_token using refresh_token.

Post Reply