accessTokenScopeInsufficient constant

ErrorReason const accessTokenScopeInsufficient

The request is denied because the provided access token doesn't have at least one of the acceptable scopes required for the API. Please check OAuth 2.0 Scopes for Google APIs for the list of the OAuth 2.0 scopes that you might need to request to access the API.

Example of an ErrorInfo when the request is calling Cloud Storage service with an access token that is missing required scopes:

{ "reason": "ACCESS_TOKEN_SCOPE_INSUFFICIENT",
  "domain": "googleapis.com",
  "metadata": {
    "service": "storage.googleapis.com",
    "method": "google.storage.v1.Storage.GetObject"
  }
}

Implementation

static const accessTokenScopeInsufficient = ErrorReason(
  'ACCESS_TOKEN_SCOPE_INSUFFICIENT',
);