/**
  * Get an OAuth2 access token for the applications service account without
  * caching the result. Usually getAccessToken($scopes) should be used instead
  * which calls this method and caches the result in memcache.
  *
  * @param array $scopes The scopes to acquire the access token for.
  * Can be either a single string or an array of strings.
  *
  * @throws InvalidArgumentException If $scopes is not a string or an array of
  * strings.
  * @throws AppIdentityException If there is an error using the AppIdentity
  * service.
  *
  * @return array An array with the following key/value pairs.
  * 'access_token' - The access token for the application.
  * 'expiration_time' - The expiration time for the access token.
  */
 private static function getAccessTokenUncached($scopes)
 {
     $req = new GetAccessTokenRequest();
     $resp = new GetAccessTokenResponse();
     if (is_string($scopes)) {
         $req->addScope($scopes);
     } else {
         if (is_array($scopes)) {
             foreach ($scopes as $scope) {
                 if (is_string($scope)) {
                     $req->addScope($scope);
                 } else {
                     throw new \InvalidArgumentException('Invalid scope ' . $scope);
                 }
             }
         } else {
             throw new \InvalidArgumentException('Invalid scope ' . $scopes);
         }
     }
     try {
         ApiProxy::makeSyncCall(self::PACKAGE_NAME, 'GetAccessToken', $req, $resp);
     } catch (ApplicationError $e) {
         throw AppIdentityService::applicationErrorToException($e);
     }
     return ['access_token' => $resp->getAccessToken(), 'expiration_time' => $resp->getExpirationTime()];
 }