我尝试为youtube视频上传创建一个网页,因此我尝试从google api控制台获取客户端ID,并在api控制台中显示如下内容:
Client ID: 533832195920.apps.googleusercontent.com
Redirect URIs: http://bobyouku.ap01.aws.af.cm/testyoutube.php
https://developers.google.com/oauthplayground
Run Code Online (Sandbox Code Playgroud)
但是,当我尝试使用以下URL测试我的帐户时:
它给出了invalid_client的结果.即使我在oauth2操场上尝试它,也会发生同样的失败
所以任何人都知道发生了什么?
我正在使用谷歌的新游戏服务测试我的游戏,我想重置我的帐户的成就以进行测试.
我发现你可以使用谷歌的API(https://developers.google.com/games/services/management/api/#Achievements)重置成就,我正在使用OAuth 2.0游乐场发送POST请求,但是它不工作:(
具体来说,我是发送POST请求" https://www.googleapis.com/games/v1management/achievements/reset ",详见该链接.
并且,当我转到code.google com并检查我的服务时,所有Play服务都是"开启".
这是输出.如何重置我的成就以进行测试?我甚至关闭了吗?显然我的"访问没有配置"我该怎么做?如果不授予我的访问权限,OAuth2.0游乐场的前两个步骤的重点是什么?
HTTP/1.1 403 Forbidden
Content-length: 205
X-xss-protection: 1; mode=block
X-content-type-options: nosniff
X-google-cache-control: remote-fetch
-content-encoding: gzip
Server: GSE
Reason: Forbidden
Via: HTTP/1.1 GWA
Cache-control: private, max-age=0
Date: Sun, 19 May 2013 04:11:38 GMT
X-frame-options: SAMEORIGIN
Content-type: application/json; charset=UTF-8
Expires: Sun, 19 May 2013 04:11:38 GMT
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "accessNotConfigured",
"message": "Access Not Configured"
}
],
"code": 403,
"message": "Access Not Configured"
}
}
Run Code Online (Sandbox Code Playgroud) achievements oauth2-playground google-play-services google-play-games
我的页面上有"使用Google+登录"按钮.当人们点击它时,我希望他们唯一授权的是"查看您的电子邮件地址".
我不想要"知道你是在谷歌谁"或"查看有关您的帐户的基本信息." 我只想要他们的电子邮件地址.
我正在玩OAuth 2.0 Playground(https://developers.google.com/oauthplayground/)并看到这个:
范围: email
要求:
范围:( https://www.googleapis.com/auth/userinfo.email 并且这个不推荐使用)
要求:
Google通过api提供了许多数据.Google plus提供人员,活动和评论的数据.但它没有提供社区,活动等新功能的数据.我如何通过谷歌加api访问这些东西?
我需要社区的数据,我联合并能够发布该数据vi api.我还需要在我的页面上显示google plus事件.
我正在学习如何访问谷歌日历API以创建和访问事件.我正在尝试使用OAuth 2.0 Playground来理解API.我正在为什么设置为calendarid和eventid而苦苦挣扎
https://www.googleapis.com/calendar/v3/calendars/{calendarId}/events/{eventId}
Run Code Online (Sandbox Code Playgroud)
任何人都可以指导我.
此致,Sureshkumar Menon
google-app-engine google-calendar-api oauth-2.0 oauth2-playground
间歇性地收到此错误
请求https://www.googleapis.com/discovery/v1/apis/gmail/v1/rest时的 HttpError 403返回“调用方没有权限”
它有时有效,有时则无效。我在 oauth2 操场上看到了同样的问题
这是我的代码 -
googlecredentials = GoogleCredentials(
access_token=None,
client_id='xxx',
client_secret='xxxx',
refresh_token='xxxx',
token_expiry=None,
token_uri="https://www.googleapis.com/oauth2/v3/token",
user_agent='Python client library'
)
service = build('gmail', 'v1', credentials=googlecredentials)
results = service.users().labels().list(userId='me').execute()
labels = results.get('labels', [])
response = service.users().messages().list(userId='me', q='subject:FDA').execute()
print(response)
Run Code Online (Sandbox Code Playgroud) python oauth2-playground google-oauth google-api-python-client gmail-api
如果我去google api playground,我会执行以下步骤:
第1步:选择并授权API.我选择了两个范围
因为我需要从用户那里读取血糖和压力.
我选择了一个谷歌用户并授权应用程序读取数据.
第2步:交换令牌的授权码.我交换授权令牌以获取访问和刷新令牌.
第3步:配置API请求.从List可能的操作中,我选择DataSources UsersLists使用提供的OAuth范围对开发人员可见的所有数据源.该清单并非详尽无遗; 用户可能拥有仅对其他开发人员可见的私有数据源,或使用其他范围的调用.要求:获取https://www.googleapis.com/fitness/v1/users/ {userId}/dataSources
我和我一起改变{userId},我想要检索数据源来读取血糖和血压,但我收到的是一个空数组.{ "数据源": [] }
我需要测试这些值(压力和葡萄糖)的读数.我在谷歌操场上有哪些步骤才能获得这两个读数?
提前致谢
您好Stackoverflow社区,
我正在尝试配置网络应用程序以利用某些Google 范围。我希望用户要么批准所有这些,要么拒绝所有这些。
这正是我在使用Google OAuth Playground时得到的行为:
看,我在每个范围内都有一个无法取消选中的“实心圆”。用户要么允许访问所有列出的范围,要么拒绝访问所有范围。一次全部。
但在我的应用程序中,每个权限都映射到一个可以ALLOWED或DENIED的弹出窗口。另外,最后会显示相同的同意屏幕,但用户可以选择/取消选择某些权限。(复选框)
尽管这听起来可能更细致,但我认为这也有点令人困惑,而且它扩展了我的应用程序中的逻辑,因为我需要仔细检查是否已授予所有范围的权限。我确实需要它们来完成我需要做的事情,所以,只有一个范围对我来说没有用,我可能需要重新触发授予权限过程:这实际上是我试图避免的。我的意思是,处理完全被拒绝的情况是可以的,但部分范围获得批准并不是我想要的。
解决方案是模仿Google OAuth Playground的做法。
我已在我的同意屏幕配置中明确添加了范围(现在正在审核中)。但我仍然明白这种行为。
为了获得确切的行为,我可能会缺少 oAuth url 的哪些配置或参数?
谢谢!
使用谷歌oauth2游乐场:https ://developers.google.com/oauthplayground/关注:https://developers.google.com/accounts/docs/OAuth2WebServer#offline
为什么我收到无效请求?
POST /o/oauth2/token HTTP/1.1
Host: accounts.google.com
Content-length: 209
Content-type: application/x-www-form-urlencoded
Authorization: OAuth ya29.XXXXXXXX
client_id=XXXXXXXXX&
client_secret=XXXXXXXXX&
refresh_token=1/0ffkj5lggn8XXXXXXXXX&
grant_type=refresh_token
HTTP/1.1 400 Bad Request
Content-length: 33
X-xss-protection: 1; mode=block
X-content-type-options: nosniff
X-google-cache-control: remote-fetch
-content-encoding: gzip
Server: GSE
Reason: Bad Request
Via: HTTP/1.1 GWA
Pragma: no-cache
Cache-control: no-cache, no-store, max-age=0, must-revalidate
Date: Thu, 11 Oct 2012 21:29:55 GMT
X-frame-options: SAMEORIGIN
Content-type: application/json
Expires: Fri, 01 Jan 1990 00:00:00 GMT
{
"error" : "invalid_request"
}
Run Code Online (Sandbox Code Playgroud) 我试图承担角色以测试 CloudSearch API,但我被锁定了。
我懂了:
This app is blocked
The app tried to access sensitive info in your Google Account. To keep your account safe, Google blocked access.
Run Code Online (Sandbox Code Playgroud) google-oauth ×5
achievements ×1
api ×1
gmail-api ×1
google-api ×1
google-fit ×1
google-plus ×1
oauth-2.0 ×1
python ×1
scopes ×1