-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
403 Forbidden #22
Comments
The second argument should either be null (for the first page) or the value you get in a response's "nextPageToken", which should be a short alphanumeric string. It's not a numeric index. |
I did try leaving it null at first but I get the same error. I successfully transfer the user to Google for Authorization, the user returns and I check that the connection is authorized (it is) yet I still get a 403 error. Maybe something else is wrong. However, I was able to use the access token I received to work with the GData contacts api. |
I get the same error as well. I'm trying to get the contacts in circles. The user gets successfully authorized with the scope Any ideas? Update: |
@vkonnackal To use "me" you need to authenticate with scope https://www.googleapis.com/auth/plus.me @deanpeterson Can you please paste the HTTP request and response? |
I got the same issue with 1.0.0.RELEASE. I'm using Spring Social Security to authenticate user, and the authentication process was almost finished, but in the last step of creating Connection data, it failed:
After debugging, the problem is at GoogleConnectionFactory.extractProviderUserId():
So when it calls fetchUserProfile(api), it uses
The actual http request is GET https://www.googleapis.com/plus/v1/people/me I checked the header, the OAuth2RequestInterceptor works, I can see the "Authorization" header with access token. But it still got 403 Forbidden. The origin response is like this (copied from debug output):
In Google API document (https://developers.google.com/+/api/latest/people/get), if I test with profile scope, the request is like this:
The difference is it has "?key={YOUR_API_KEY}" in the url. Does it cause the 403 if we are missing key in the request url? |
I got it figured out. I have to turn on Google+ API in Google Developer Console for my application. |
I get a 403 forbidden error when testing out this piece of code. I have a valid, authorized, non-expired connection. Am I doing something wrong?
PeoplePage peoplePage = connection.getApi().plusOperations().searchPeople("Troutman", "0");
403 Forbidden
at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:88)
at org.springframework.web.client.RestTemplate.handleResponseError(RestTemplate.java:533)
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:489)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:461)
at org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:229)
at org.springframework.social.google.api.query.impl.ApiQueryBuilderImpl.getPage(ApiQueryBuilderImpl.java:78)
at org.springframework.social.google.api.plus.impl.PlusTemplate.searchPeople(PlusTemplate.java:109)
The text was updated successfully, but these errors were encountered: