1

I have successfully implemented the Oauth 2 for installed application using bigquery api for java. But for getting users permission browser gets opened.

My Question is that, Is it possible to implement Oauth 2 for Installed applications without opening/launching the browser and get the code from google.

V__
  • 538
  • 10
  • 20

2 Answers2

2

You can use a service account credentials and you need to authorize just once.

Also you can have a backend part of your application where you do all your API codes. Frontend -> Backend -> BQ API

Pentium10
  • 204,586
  • 122
  • 423
  • 502
  • Thank you. I have implemented it with refresh token which also need to authorize once. Actually I am developing JDBC driver for BigQuery. The application which is going to use this JDBC driver is a standalone application. It doesn't make sense to open browser while working with JDBC. – V__ Apr 14 '15 at 03:32
  • Is there any way to do the same without authenticating from browser ? – V__ Apr 14 '15 at 03:34
  • This driver also uses the same method which opens browser for getting the user permission. – V__ Apr 14 '15 at 13:08
0

It very much depends on who's account your application is trying to access. The three options are:-

  1. A Service Account
  2. The end user's account
  3. Your account

Your question implies option 2, in which case there is no alternative since Google Oauth needs to verify that the user is present.

pinoyyid
  • 21,499
  • 14
  • 64
  • 115
  • @ pinoyyid , Thank You. Please read the comments on above answer – V__ Apr 14 '15 at 03:37
  • This might help http://stackoverflow.com/questions/19766912/how-do-i-authorise-a-background-web-app-without-user-intervention-canonical – pinoyyid Apr 14 '15 at 06:33