💵 Enter the coupon code BLACKFRIDAY before 30th of November for a 25% discount on any new SMS Server license license 💵

How can we help?

Google OAuth2 which end-point URLs and scope values can I use?

When using Gmail or the Google Cloud Platform you’re using the Google OAuth2 framework.

To setup your application for use with the Google OAuth2 framework you’ll need to know the following:

  • Which end-point URLs to configure
  • Which scope values to use

End-point URLs

Please use these URLs to setup your OAuth2 connection to connect to Google.

URL Description
https://accounts.google.com/o/oauth2/v2/auth Authorization code URL. Only used in the ‘Authorization code flow’
https://oauth2.googleapis.com/device/code Device code URL. Only used in the ‘Device code flow’ for desktop applications.
https://oauth2.googleapis.com/token The token exchange URL. This is used in every OAuth2 flow.

Whether to use the authorization code flow or device code flow depends on the ‘Application type’ option when creating the application.

Scope values

When building your own OAuth2 supporting application you’ll need to specify which scope you need to access. If you’re setting up an OAuth2 connection to Google services in an existing desktop application this will probably not apply.


Scope Description
email Use this scope to send email when using the device code flow.
https://mail.google.com Use this scope to send or receive e-mail when using the authorization code flow.