我想使用OAuth 2.0 for Devices上传文件来访问Google Drive。因此,我将范围变量设置为https://www.googleapis.com/auth/drive
,并在Google开发者控制台上启用了apis。Google Oauth 2.0范围问题
我的要求
POST /o/oauth2/device/code HTTP/1.1
Host: accounts.google.com
Content-Type: application/x-www-form-urlencoded
client_id=3146639059-qvroaqrtit609qaknv8anvdn2umus01q.apps.googleusercontent.com & scope=https://www.googleapis.com/auth/drive
但是我得到响应是
{
"error" : "invalid_scope",
"error_description" : "Not authorized to request the scopes: [https://www.googleapis.com/auth/drive]",
"error_uri" : "http://code.google.com/apis/accounts/docs/OAuth2.html"
}
相反的https://www.googleapis.com/auth/drive
如果我使用email
的范围及其工作fine.Please帮我解决这个问题。
感谢
您是否启用了驱动器api和驱动sdk – DaImTo 2014-10-01 18:55:55
ya我已启用驱动器api并驱动sdk – Cool 2014-10-02 02:50:02
将完整的http请求和响应粘贴到您的问题中。这是一个应用程序域用户吗? – pinoyyid 2014-10-02 04:28:56