Search code examples
androidreact-nativegoogle-cloud-platformgoogle-fit

"Sensitive scopes you submitted for review aren't the same as the scopes that your app requests" React Native Google Fit


I submitted my app for review that is using Android Google Fit API. I got the following response from Google.

Hi,

Thanks for applying for OAuth App verification your response reaching out.

We noticed that the sensitive scopes you submitted for review aren't the same as the scopes that your app requests:

Scopes Submitted for Review​

https://www.googleapis.com/auth/fitness.activity.read

https://www.googleapis.com/auth/fitness.activity.write

Requested by your App

https://www.googleapis.com/auth/fitness.activity.read

with the verification process, please update either of the following:

The request for scopes in your app's codebase so that the scopes requested by your app match the scopes {in your Console/in review} or The scopes you submitted for review using the scope picker in your Console. If you're adding scopes to your Google Cloud project, make sure you provide a detailed Scope Justification for each additional scope you submit for review. You can find more information in the OAuth Application Verification FAQ. If you have other questions, please reply to this email to continue

Thing is in GCP I clearly only request read access:

sensitive scopes img in GCP

And then using React-Native-Google-Fit library in code I request:

 const options = {
     scopes: [Scopes.FITNESS_ACTIVITY_READ, Scopes.FITNESS_LOCATION_READ],
 };

 const authResponse = await GoogleFit.authorize(options);

Where does Google get the idea that I'm requesting write access? How do I fix this? I only need to read the exercises from Google Fit.


Solution

  • So I just had to add fitness.location.read to requested scopes. It seems Google was invalidly thinking I was requesting fitness.activity.write even though it should have been fitness.location.read.