Google drive api 谷歌驱动器API需要的支持

Google drive api 谷歌驱动器API需要的支持,google-drive-api,Google Drive Api,我一直在犯这个错误 401那是个错误 错误:无效的\u客户端 找不到OAuth客户端。 请求详细信息 immediate=false response_type=token scope=https://www.googleapis.com/auth/drive.readonly redirect_uri=postmessage proxy=oauth2relay911247760 state=882158738|0.380667456 origin=http://www.myserver.dev

我一直在犯这个错误 401那是个错误

错误:无效的\u客户端

找不到OAuth客户端。 请求详细信息

immediate=false
response_type=token
scope=https://www.googleapis.com/auth/drive.readonly
redirect_uri=postmessage
proxy=oauth2relay911247760
state=882158738|0.380667456
origin=http://www.myserver.dev
include_granted_scopes=true
client_id=733677449783-holhtgvu994e0oavk4hud3mupbu71b2f.apps.googleusercontent.com.apps.googleusercontent.com
authuser=0
我们只知道这些

我已经创建了一个项目Proj1 将产品名称设置为Proj1 启用了相关的API 客户端ID 733677449783-HOLHTGVU994E0OAVK4HUD3MUBU71B2F.apps.googleusercontent.com Javascript的起源 重定向URI API密钥 AIzaSyDBt5-gE9xJOGIqamru46cw-RIipKbsI2o

是否有任何其他参数需要设置

string state = "882158738|0.380667456";
string scope = "https://www.googleapis.com/auth/drive.readonly";
string redirect_uri = "APIAddress";
string GoogleClientID= "your ClientID";

string oauthUrl = string.Format("https://accounts.google.com/o/oauth2/auth?" +
                                   "scope={0}&state={1}&redirect_uri={2}&response_type=code&client_id={3}&approval_prompt=force&access_type=offline",
HttpUtility.HtmlEncode("scope"),
state,
HttpUtility.HtmlEncode(redirect_uri ),
HttpUtility.HtmlEncode(GoogleClientID));

return oauthUrl ;