0

I am currently using Gspread python library to write data to a google spreadsheet. However, the google spreadsheet is secure and I am unable to share the client email to write data to the spreadsheet. Is there a work around to write data from my python script? I am unable to change the configuration to make it sharable with anything.

1 Answers1

0

Scope: spreadsheets.google.com/feeds/ email scope is not required

e.g.

   scopes = ["https://spreadsheets.google.com/feeds/"]

Sound like an OAuth2 issue - suggest you list the OAuth 2 scope settings you are using, but I think e-mail is not required

I think most example tend to include it, but don't think it is needed. This example is python, might help you, but it does include email https://github.com/eddyparkinson/gridspree

it has:

def login(force=True):
    next = request.args.get('next') or settings.SERVICE_URL
    scopes = ["https://spreadsheets.google.com/feeds/",
              "https://www.googleapis.com/auth/plus.me",
              "https://www.googleapis.com/auth/userinfo.email",
              "https://www.googleapis.com/auth/drive.readonly"]
    params = {
        'response_type':'code',
        'access_type':'offline',
        'state': next
    }

    if force:
        params.update(approval_prompt='force')

    authorization_url = get_auth_url(' '.join(scopes), **params)
eddyparkinson
  • 3,680
  • 4
  • 26
  • 52
  • question is very unclear but I doubt thats what he means. by email i think he means his google email account that he uses to log into his app. the spreadsheet is shared with him only. – Zig Mandel Jun 04 '15 at 14:31
  • @ZigMandel fair comment - the question is not clear on a few points. – eddyparkinson Jun 05 '15 at 00:21