I've created some google spreadsheets using the gspread and shared with some lists of emails with different permissions. Is there a way to somehow get the list or dict of these emails and permissions?
This is more or less my code:
import gspread as gs
gc = gs.service_account_from_dict(JSON_KEY)
gs = gc.create('new_spreadsheet')
ws = gs.add_worksheet(title='new_worksheet', rows='100', cols='12')
gs.del_worksheet(gs.worksheet('Sheet1'))
std_writers = ['email_1@email.com', 'email_2@email.com', 'email_3@email.com', 'email_4@email.com']
std_viewers = ['email_5@email.com', 'email_6@email.com', 'email_7@email.com', 'email_8@email.com']
for writer in std_writers:
gs.share(email_address=writer, perm_type='user', role='writer')
for viewer in std_viewers:
gs.share(email_address=viewer, perm_type='user', role='reader')
I was expecting to use the gspread to return these emails to double check and also to get the updated list o users in case someone with the writer's permission had shared with someone.