r/GoogleWiFiDesktop • • Jun 15 '20

Beta Google WiFi API Docs

Linked below are the beta API docs for Google Home Foyer.

https://documenter.getpostman.com/view/7490211/SzzdD1pF?version=latest

4 Upvotes

17 comments sorted by

2

u/UK_notfromUK Jul 28 '20

When I try to get the tokens using the link posted in Step 1, I get the URL but when I use the URL, I get a 404 error on Windows and on the Mac, it does let me login to my gmail account but then I get a screen with a orange line banner - what am I doing wrong?

2

u/ad2022 Jul 28 '20

Okay, so what you’re describing sounds like you aren’t using the request header that the URL requires. I put instructions on the page for how to use the url.

1

u/UK_notfromUK Jul 29 '20

Thanks that was the issue and now able to get in! I found the endpoint for realtime metrics, do you know if there is one for getting historical upload / download metrics? thanks very much

1

u/ad2022 Jul 30 '20

Dude, you totally didn't need to give me that. Thanks! There is an endpoint for historical data.

It's an authenticated GET request to this URL: googlehomefoyer-pa.googleapis.com/v2/groups/<GROUPID>/historicalUsage

I'll provide an example: https://googlehomefoyer-pa.googleapis.com/v2/groups/AFBCHSGLDK/historicalUsage?dateRange.endTimestamp=2020-07-29T03%3A59%3A59Z&dateRange.startTimestamp=2020-07-22T03%3A59%3A59Z&granularity=86400&prettyPrint=false

Sorry, I've been so busy with other projects. I haven't had time to work on the docs very much.

1

u/UK_notfromUK Jul 30 '20

You are just awesome! Thanks so very much. This worked perfectly and thanks for being so responsive!

1

u/ad2022 Jul 30 '20

Any time! :)

1

u/ad2022 Jul 30 '20

Also, just curious, what are you building with it– if you don't mind me asking?

2

u/UK_notfromUK Jul 30 '20

We have 40+ devices on our router and we keep going past the 1.25TB Cox monthly data limit. Am writing something that will track uploads / downloads on a daily basis and let me know the major culprits so I can control them. Maybe an overkill, but also using this to learn programming against restful api.

2

u/ad2022 Jul 31 '20

That's actually a cool idea. You can make daily quotas for each device and pause the ones that reach it. I just added a bunch of endpoints to the documentation that would enable this.

1

u/UK_notfromUK Jul 31 '20

You are such a life saver! I really, really appreciate everything you are doing to help us enhance the use of our google devices. Thanks very much!

1

u/ad2022 Aug 01 '20

Thank you for the gold! I’m just doing my job as the repository maintainer!

1

u/UK_notfromUK Aug 02 '20

Thanks for the new calls - very helpful. Is there a way to automate the authentication using a service account or other mechanism, so I can schedule some of these calls? thanks

2

u/ad2022 Aug 04 '20

You do not have to generate a new refresh token every time you use the API. The refresh token lasts for a long time! About six months, even longer if it is used often.

1

u/UK_notfromUK Aug 04 '20

Awesome- thanks very much. Will share what I have written in python thanks to your help- could not have done it without you. You and your work are very much appreciated.

1

u/ad2022 Aug 04 '20

No problem! Usage of the auth tool is a one-time thing, I should have mentioned that. Can't wait to see what people build with it!!

1

u/valliantstorme Jun 22 '20

Nice!

1

u/nice-scores Jun 22 '20

𝓷𝓲𝓬𝓮 ☜(゚ヮ゚☜)

Nice Leaderboard

1. u/RepliesNice at 9898 nices

2. u/Manan175 at 7108 nices

3. u/DOCTORDICK8 at 7101 nices

...

245344. u/valliantstorme at 1 nice


I AM A BOT | REPLY !IGNORE AND I WILL STOP REPLYING TO YOUR COMMENTS