gcloud Create OAuth Token

Learn how to generate an OAuth token using Google Cloud's gcloud CLI and REST API. This guide covers uploading a ZIP archive, configuring credentials, and deploying services with secure authentication.

see also generate token from service account keyfile ext-code.com


visit https://console.cloud.google.com/apis/dashboard for your project

            
            
click 

credentials -> create credentials -> oauth client id

            
            
select web app and give the client a name

            
            
enter authorised domains, this is where web request will come from
 to use oath playground add also
 
 https://oauth-redirect.googleusercontent.com
 
 and also origins such as a development origin
 
 http://localhost:3000
 
            
            
under Authorized redirect URIs

redirect uri's are sometimes used when granting access, the user will be sent to a google 
consent page, when they consent they'll be redirected back here with the token in the 
page search parameters

  add 

https://oauth-redirect.googleusercontent.com/r/oauth2playground

  to use the oauthplayground
  
            

save the credentials, you'll need

  client_id
  
  client_secret