Error code 403 in Google+ api

2019-01-15 00:06发布

I got "error": { "errors": [ { "domain": "usageLimits", "reason": "dailyLimitExceededUnreg", "message": "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.", "extendedHelp": "https://code.google.com/apis/console" } ], "code": 403, "message": "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup." } When i try to fetch User Profile in Google+ api by https://www.googleapis.com/plus/v1/people/me URL String.If anyone have any suggestion then please tell me as soon as possible.Thanks in advance for your time.

5条回答
女痞
2楼-- · 2019-01-15 00:40

I got the same error and after much hunting I found that, in my case, the Authorization header with the access token was not set. Set Authorization: "Bearer <YOUR_ACCESS_TOKEN>" in the header of the request of EVERY Google API call.

查看更多
狗以群分
3楼-- · 2019-01-15 00:45

BrettJ's answer will cover most of the bases. However, you will also get this error - even when your credentials are properly authenticated - when the scope is not properly set up. I would check the scope setting in your OAuth dance. Make sure your user is permitted to do the thing your code is trying to help them do.

查看更多
劳资没心,怎么记你
4楼-- · 2019-01-15 00:47

On top of what BrettJ has mentioned, it is important to send the authorization header for the request done to fetch UserProfile in google+ API.

For example, Add the following header key: Authorization value: Bearer ya29.Ci-cA_CywoVdVG#######

查看更多
再贱就再见
5楼-- · 2019-01-15 00:54

That message implies that you haven't set up a Google APIs console project.

  1. Create a Google APIs Console project
  2. On the Services pane, enable all of the APIs that your project requires.
  3. On the API Access pane, click Create an OAuth 2.0 client ID. A dialog opens. Fill in your project's information. Click Next
  4. Choose the appropriate application type. Based on the tags you used for this post, I am guessing this is an iOS project so select Installed application.
  5. Enter your bundle ID. You don't need to enter an App Store ID until your app is listed there.
  6. Click Create Client ID.

You will see the client ID and client secret values. You will use these values to enable communication with your project and the Google APIs.

If you aren't already using it, see the Google+ iOS SDK and documentation for a full walk through. The task called "write moments" is similar in implementation and demonstrates how to connect to and use the Google+ REST APIs from within an iOS project that uses the SDK.

You'll need to specify the scope of plus.me to get the profile information.

查看更多
聊天终结者
6楼-- · 2019-01-15 01:01

I just want to add a little information here in the rare case that someone runs into this problem.

I have an organization (ORG). I created a second channel (SC) with some playlists, that referenced videos from ORG.

I made the mistake of assuming that because ORG owned SC, that I could use the same oauth credentials from ORG to access both. I was wrong.

I switched credentials and was confused when I could access the playlists but not the videos. Again, I needed credentials for each one separately to access the resources on the respective channel.

Lame, but that was how it was.

查看更多
登录 后发表回答