google-oauth-java-client

Gmail API access using Android

非 Y 不嫁゛ 提交于 2019-11-30 11:59:56
I am trying to access the Gmail API using an Android application. I have successfully requested and received an access token using all available scope combinations. But it seems that every time I actually try to use the Gmail API command I am getting a 403 exception reading: Access not configured please use Google developers console to activate the api... Needless to say the API is activated and a client key was created using the correct package name & sha1 code. Same client ID works well with Google Plus features. Anyone having this issue or succeeded in connecting to the Gmail api from

Migration from OAuth1 3L to OAuth2:

瘦欲@ 提交于 2019-11-29 16:47:18
I'm trying to migrate existing OAuth1.0 3L tokens to OAuth2.0 for a web app. I am following the instructions at https://developers.google.com/accounts/docs/OAuth_ref Despite all my best efforts, I keep getting this response: "Invalid authorization header." To create the Authorization header, I use Google's Java client library 1.0, the same I use in the application to talk to google calendar. I am testing with an access token. token secret, consumer key and consumer secret that work without problem (i.e. I can use these credentials to make calls to Google Calendar, etc). This is the code I use:

Gmail atom feed with 2-legged OAuth receive 401 error

三世轮回 提交于 2019-11-28 19:01:28
We are experiencing the issue of Gmail atom feed with 2-legged OAuth, an error message is "401 unauthorized". The error message is like below. <HTML> <HEAD> <TITLE>Unauthorized</TITLE> </HEAD> <BODY BGCOLOR="#FFFFFF" TEXT="#000000"> <H1>Unauthorized</H1> <H2>Error 401</H2> </BODY> </HTML> Until last week, we have no problem using Gmail atom feed. From this week, we are experiencing the issue even though we have a no change regarding Gmail atom feed and oauth. Now, this problem do not occurs on all users(50,000 accounts), but this issue is increasing more and more. It seems that this problem is

Migration from OAuth1 3L to OAuth2:

二次信任 提交于 2019-11-28 11:30:00
问题 I'm trying to migrate existing OAuth1.0 3L tokens to OAuth2.0 for a web app. I am following the instructions at https://developers.google.com/accounts/docs/OAuth_ref Despite all my best efforts, I keep getting this response: "Invalid authorization header." To create the Authorization header, I use Google's Java client library 1.0, the same I use in the application to talk to google calendar. I am testing with an access token. token secret, consumer key and consumer secret that work without

Google OAUTH: The redirect URI in the request did not match a registered redirect URI

牧云@^-^@ 提交于 2019-11-27 18:57:15
I am trying to make an upload to YouTube from my Java based web app, I spent a few days to understand what and where is the problem and I cannot get it, for now I am pulling my hair out off my head. I registered my web app in Google Console, so I got a pair of Client ID and Secret and a possibility to download JSON type file with my config. So here is the config: { "web":{ "auth_uri":"https://accounts.google.com/o/oauth2/auth", "client_secret":"***", "token_uri":"https://accounts.google.com/o/oauth2/token", "client_email":"***", "redirect_uris":["http://localhost:8080/WEBAPP/youtube-callback

Gmail atom feed with 2-legged OAuth receive 401 error

落爺英雄遲暮 提交于 2019-11-27 12:08:14
问题 We are experiencing the issue of Gmail atom feed with 2-legged OAuth, an error message is "401 unauthorized". The error message is like below. <HTML> <HEAD> <TITLE>Unauthorized</TITLE> </HEAD> <BODY BGCOLOR="#FFFFFF" TEXT="#000000"> <H1>Unauthorized</H1> <H2>Error 401</H2> </BODY> </HTML> Until last week, we have no problem using Gmail atom feed. From this week, we are experiencing the issue even though we have a no change regarding Gmail atom feed and oauth. Now, this problem do not occurs

Getting a 403 - Forbidden for Google Service Account

一世执手 提交于 2019-11-27 05:22:26
I am trying to get an access token for Google Service Account. Following is my code - String SERVICE_ACCOUNT_EMAIL = "edited@developer.gserviceaccount.com"; List scope = new ArrayList(); scope.add("https://www.googleapis.com/auth/admin.directory.user"); String keyFile = "C:\\edited-privatekey.p12"; HttpTransport HTTP_TRANSPORT = new NetHttpTransport(); JsonFactory JSON_FACTORY = new JacksonFactory(); GoogleCredential credential = new GoogleCredential.Builder() .setTransport(HTTP_TRANSPORT) .setJsonFactory(JSON_FACTORY) .setServiceAccountId(SERVICE_ACCOUNT_EMAIL) .setServiceAccountScopes(scope)

Getting a 403 - Forbidden for Google Service Account

拥有回忆 提交于 2019-11-26 11:34:12
问题 I am trying to get an access token for Google Service Account. Following is my code - String SERVICE_ACCOUNT_EMAIL = \"edited@developer.gserviceaccount.com\"; List scope = new ArrayList(); scope.add(\"https://www.googleapis.com/auth/admin.directory.user\"); String keyFile = \"C:\\\\edited-privatekey.p12\"; HttpTransport HTTP_TRANSPORT = new NetHttpTransport(); JsonFactory JSON_FACTORY = new JacksonFactory(); GoogleCredential credential = new GoogleCredential.Builder() .setTransport(HTTP