天道酬勤,学无止境

google-plus-domains

403 Forbidden response Google API

问题 我正在使用 Google+ Api 为用户创建新圈子。 当我尝试 POST 请求时,我得到如下响应: { "error": { "errors": [ { "domain": "global", "reason": "forbidden", "message": "Forbidden" } ], "code": 403, "message": "Forbidden" } } 这是我尝试使用 Google 自己的 Google API 浏览器 https://developers.google.com/+/domains/api/circles/insert 执行相同请求时得到的相同响应,这对我来说似乎很奇怪。 为什么我从谷歌自己的 api expolrer 收到禁止响应? 这可能是他们的问题吗? 我正在使用 scribe OAuth 库和 yincrash Google2Api https://github.com/fernandezpablo85/scribe-java https://gist.github.com/yincrash/2465453 请求是在 AsyncTask 中这样创建的 OAuthService service = new ServiceBuilder() .provider(Google2API.class) .apiKey(GOOGLE

2022-05-11 16:16:04    分类:技术分享    android   google-api   google-plus   http-status-code-403   google-plus-domains

403 Forbidden response Google API

I am using the Google+ Api to create new circles for users. When I try and to a POST request I get a response like this: { "error": { "errors": [ { "domain": "global", "reason": "forbidden", "message": "Forbidden" } ], "code": 403, "message": "Forbidden" } } This is the same response I get when I try to do the same request using Googles own Google API explorer https://developers.google.com/+/domains/api/circles/insert which seems wierd to me. Why am I getting a forbidden response from googles own api expolrer? Could this be something wrong on their end? I am using scribe OAuth library together

2022-05-03 00:09:14    分类:问答    android   google-api   google-plus   http-status-code-403   google-plus-domains

如果我已经拥有访问令牌的值,如何创建 UserCredential 的实例?(How to create a instance of UserCredential if I already have the value of Access Token?)

问题 所以我有这个代码我的问题是,如果我已经通过 OAuth 进行了身份验证,我该如何配置UserCredential ? 当前的情况是代码将显示另一个重定向到 google 的登录页面。 由于我已经使用 asp.net MVC 通过 OAuth 进行了身份验证并且我已经有了令牌,如何摆脱GoogleWebAuthorizationBroker并直接传递令牌? string[] scopes = new string[] {PlusService.Scope.PlusLogin, PlusService.Scope.UserinfoEmail, PlusService.Scope.UserinfoProfile}; UserCredential credential = GoogleWebAuthorizationBroker.AuthorizeAsync(new ClientSecrets { ClientId = "xxx.apps.googleusercontent.com", ClientSecret = "xxxx" }, scopes, Environment.UserName, CancellationToken.None, new FileDataStore("Store")).Result; PlusService service = new

2021-11-21 18:57:23    分类:技术分享    c#   asp.net-mvc   google-api-dotnet-client   google-plus-domains

How to create a instance of UserCredential if I already have the value of Access Token?

So I have this code My question is how do I configure the UserCredential if I'm already authenticated via OAuth? The current scenario is the code will display another login page redirecting to google. Since I'm already authenticated via OAuth using asp.net MVC and I already have the token how to I get rid of the GoogleWebAuthorizationBroker and directly pass the token? string[] scopes = new string[] {PlusService.Scope.PlusLogin, PlusService.Scope.UserinfoEmail, PlusService.Scope.UserinfoProfile}; UserCredential credential = GoogleWebAuthorizationBroker.AuthorizeAsync(new ClientSecrets {

2021-11-14 19:38:31    分类:问答    c#   asp.net-mvc   google-api-dotnet-client   google-plus-domains

Google Plus 创建帖子 - Rest API - 禁止(Google Plus Creating a Post - Rest API -Forbidden)

问题 当我尝试通过调用此休息服务在用户的墙上创建帖子时收到此错误消息。 有人可以帮助我吗? 回答1 您必须在 google api 控制台中启用Google+Domain API 。然后使用您的代码重试。 回答2 要使用 google plus 域 api,您需要创建帐户 http://apps.google.com/,然后使用此用户创建帖子。 但!!! 他们创建帖子域受限。 我暂时还没有找到如何创建公共帖子的方法。 回答3 共享 API 仅适用于 G Suite 帐号。 它不适用于简单帐户@gmail.com 。 您应该创建 GSuite 帐户并将其用于 Create Post API 方法。 此帖子仅适用于域用户。 您可以查看此页面,您将找到问题的解决方案。 https://developers.google.com/+/domains/getting-started#features_comparison

2021-11-12 16:11:01    分类:技术分享    api   rest   google-plus   google-plus-domains

Google Plus Creating a Post - Rest API -Forbidden

I got this error message when I try to create a post to user's wall by calling this rest service. Can somebody help me?

2021-11-11 01:39:38    分类:问答    api   rest   google-plus   google-plus-domains