Description
When using gws auth login -s people, the scope picker generates People API scopes for reading profiles, but does not include https://www.googleapis.com/auth/contacts which is required for write operations like createContact.
Steps to reproduce
gws auth login -s people
- Approve scopes in browser
gws people people createContact --json '{"names":[{"givenName":"Test","familyName":"Contact"}]}'
Expected: Contact is created.
Actual: 403 - Request had insufficient authentication scopes.
Workaround attempted
--scopes https://www.googleapis.com/auth/contacts works alone but cannot be combined with -s to get other service scopes in the same login.
--full does not include the contacts scope either.
- Combining multiple full scope URLs in
--scopes causes truncation in the OAuth redirect URL, resulting in invalid_scope errors.
Current workaround
Using curl directly with the People API and a dedicated refresh token obtained from a contacts-only gws auth login --scopes https://www.googleapis.com/auth/contacts.
Suggested fix
- Map
-s people (or add -s contacts) to include https://www.googleapis.com/auth/contacts in the scope picker.
- Support incremental auth (adding scopes to an existing token without replacing it).
Environment
- gws 0.22.5
- macOS (Apple Silicon)
- OAuth app in production mode (not testing)
Description
When using
gws auth login -s people, the scope picker generates People API scopes for reading profiles, but does not includehttps://www.googleapis.com/auth/contactswhich is required for write operations likecreateContact.Steps to reproduce
gws auth login -s peoplegws people people createContact --json '{"names":[{"givenName":"Test","familyName":"Contact"}]}'Expected: Contact is created.
Actual:
403 - Request had insufficient authentication scopes.Workaround attempted
--scopes https://www.googleapis.com/auth/contactsworks alone but cannot be combined with-sto get other service scopes in the same login.--fulldoes not include the contacts scope either.--scopescauses truncation in the OAuth redirect URL, resulting ininvalid_scopeerrors.Current workaround
Using
curldirectly with the People API and a dedicated refresh token obtained from a contacts-onlygws auth login --scopes https://www.googleapis.com/auth/contacts.Suggested fix
-s people(or add-s contacts) to includehttps://www.googleapis.com/auth/contactsin the scope picker.Environment