我正在尝试获取设备内应用程序的授权代码,但出现无效范围错误。
我正在从终端使用此命令进行呼叫:
curl -d "client_id=XXX&scope=https://www.googleapis.com/auth/fitness.activity.read" https://accounts.google.com/o/oauth2/device/code
我得到了这样的回应:
{
"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"
}
难道我做错了什么?该应用已获得 Fitness api 的授权。</p>