I'm trying to get the authorization code for a in device application but I get an invalid scope error.
I'm making the call using this command from terminal:
curl -d "client_id=XXX&scope=https://www.googleapis.com/auth/fitness.activity.read" https://accounts.google.com/o/oauth2/device/code
And I'm getting this response:
{
"error" : "invalid_scope",
"error_description" : "Not authorized to request the scopes: [https://www.googleapis.com/auth/fitness.activity.read]",
"error_uri" : "http://code.google.com/apis/accounts/docs/OAuth2.html"
}
Am I doing something wrong? The application is authorized for fitness api.
The in device oauth-2.0 flow was not enabled for the Google-Fit API. It is now enabled.
Source: https://plus.google.com/106927497941034280613/posts/PwQ2uzq8Y4f