0

How to obtain oauth access tokens from google if i have only registered app and no server to redirect (as a "redirect_uri" parameter)?

Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449
  • the whole point of the token is to be used by some of your code, to do things with the API, if you don't have an app or website why bother requesting a token in the first place? – Andrei Dragotoniu Dec 09 '16 at 00:26

3 Answers3

0

You can use https://www.example.com/oauth2callback as your redirect uri.

Sayali
  • 356
  • 1
  • 2
  • 13
0

Yes you can get an access token without a server. We've made it fairly easy. See the docs

On android it is fairly easy https://developers.google.com/identity/sign-in/android/additional-scopes

https://developers.google.com/identity/sign-in/ios/ https://developers.google.com/identity/sign-in/ios/additional-scopes

Web https://developers.google.com/identity/sign-in/web/incremental-auth

You can just change the scopes you need.

nvnagr
  • 2,017
  • 1
  • 14
  • 11
0

I'm guessing that when you say you have no server, that your app is a native app. eg a desktop app or an embedded app. If so, you can generate tokens using the OAUth playground. See How do I authorise an app (web or installed) without user intervention? (canonical ?) for details.

Community
  • 1
  • 1
pinoyyid
  • 21,499
  • 14
  • 64
  • 115