Notice: Over the next few months, we're reorganizing the App Engine documentation site to make it easier to find content and better align with the rest of Google Cloud products. The same content will be available, but the navigation will now match the rest of the Cloud products.

Python 3.10 is now available in preview.

google.appengine.api.app_identity.get_access_token

The OAuth 2.0 access token to act on behalf of the application.

Each application has an associated Google account. This function returns an OAuth 2.0 access token that corresponds to the running app. Access tokens are safe to cache and reuse until their expiry time as returned.

scopes The requested API scope string, or a list of strings.

A Pair, Access token string and the expiration time in seconds since the epoch.

InvalidScope If the scopes are unspecified or invalid.