Skip to content

"Authentication successful" but "Access denied" #156

@LittleBrainz

Description

@LittleBrainz

I successfully followed the steps under "Manual OAuth setup (Google Cloud Console)".

Yes, I did add myself as a test user.

With "~/.config/gws/client_secret.json" in place, I successfully authenticated...

$ gws auth login
Open this URL in your browser to authenticate:

  https://accounts.google.com/o/oauth2/auth? [redacted]
{
  "account": "(unknown)",
  "credentials_file": "C:\\Users\\Stephen\\.config\\gws\\credentials.enc",
  "encryption": "AES-256-GCM (key secured by OS Keyring or local `.encryption_key`)",
  "message": "Authentication successful. Encrypted credentials saved.",
  "scopes": [
    "https://www.googleapis.com/auth/drive",
    "https://www.googleapis.com/auth/spreadsheets",
    "https://www.googleapis.com/auth/gmail.modify",
    "https://www.googleapis.com/auth/calendar",
    "https://www.googleapis.com/auth/documents",
    "https://www.googleapis.com/auth/presentations",
    "https://www.googleapis.com/auth/tasks",
    "https://www.googleapis.com/auth/pubsub",
    "https://www.googleapis.com/auth/cloud-platform"
  ],
  "status": "success"
}

I then tried an example...

$ gws drive files list --params '{"pageSize": 5}'
{
  "error": {
    "code": 401,
    "message": "Access denied. No credentials provided. Run `gws auth login` or set GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE to an OAuth credentials JSON file.",
    "reason": "authError"
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions