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.