Export Google Fit Daily Steps, Weight and Distance to a Google Sheet

Updated on Friday, April 28, 2023

Comments Page 15

Return to post.



Hey, three others things I've been seeing if would make a difference:

1) 'Secret Manager API' is not enabled. 'Stores, manages, and secures access to application secrets. $0.03/10,000 count'

Not sure I need this, no mention above.

2)'Identity and Organisation' Not sure if I need to complete this...

It seems I'll need a corporate domain and company details.

3)'Policy troubleshooter. Enter the following fields to check if the API call will grant the principal access to a resource.'

Policy troubleshooter' [Principle member e...]

Resource permission pairs'

'Resource: [e.g.] ...265113

Permission [e.g.] Example: "...etIamPolicy"


Thanks Agnes, Yes - I'm a rookie too!

The Google fitness API status is showing as enabled. However, the 'OAuth consent screen' status is still 'Verification status - Not published'.

The consent is set to 'external'. 'Internal' is only an option for Gsuite users, but it states that 'in this mode, your app is available to any user with a Google Account. External apps that request sensitive or restricted user data must first be verified by Google. This process may take 4–6 weeks. In addition, if you selected restricted scopes, you'll need to go through an independent security review, which can cost $15k–$75k.'

I'm not clear if I've set it up incorrectly so that Google thinks I'm collecting sensitive personal data! Or if the consent page will be published soon.

Agnes Krawczyk

Hi Gary, I had the same problem back in November. I didn't understand how the whole API thing worked, and hadn't enabled the Google fitness API. Once I had that sorted out, it all went well. I just had to make sure the sheet was authorizing properly so it wouldn't return an authorization error every day.


I've got further! Please ignore my last comment/question. I sorted it out when I realised the 'consent screen' had fields that seemed to be mandatory but weren't.

I am getting error 403 on my sheet though. I'll wait a day or two and see if it's just the authorisation pending, unless the error message copied below suggests to anyone that I need to tweak anything else? (thanks in advance for any help!)

request failed for ...googleapis... returned code 403. Truncated server response: { "error": { "errors": [ { "domain": "global", "reason": "forbidden", "message": "datasource not found or not readable: derived:c... (use muteHttpExceptions option to examine full response).



When I try to set up the OAuth consent screen, I'm forced to set up an 'external' one because I don't have a G-Suite subscription. Do I need a G-Suite subscription?

Robert Ellison

Chi, I don't currently track sleep so it's not something I can test. It is available via the API so should be possible to pull. Check the API explorer link in the article, this is pretty helpful for finding out what's available for your Google Fit account.


Hello :) Thank you for posting all this, I was able to set it up. Is there a way to add sleep data as a column as well?

Agnes Krawczyk

Thank you, Robert! I'm not sure why I hadn't noticed that instruction before, but it worked! Last night, data was automatically pulled for the first time.

Robert Ellison

Agnes - try following the steps in the second to last paragraph of the post to remove Google Fit access, reset and then authenticate again.

Agnes Krawczyk

Hello Robert, I now have basic functionality with this sheet and it pulls the data I need. The only problem now is with the automation. It loses authentication daily, so I have never seen it run automatically. Any idea what might be going on?

Add Comment

All comments are moderated. Your email address is used to display a Gravatar and optionally for notification of new comments and to sign up for the newsletter.

I Thought He Came With You is Robert Ellison's blog.



Average Server Response Time in Azure Metrics