Skip to content Skip to sidebar Skip to footer

Invalid Json Payload Error With Python Google Sheets Api

I'm trying to use the google sheets API to append new rows to an existing google sheet. Authentication already happens successfully and code is able to read the contents of the she

Solution 1:

I was having a similar problem. This worked for me:

   spreadsheetId = 'foobar'
    range = 'Sheet1!A1'
    body = {
        'values': [data],
        "majorDimension:": "ROWS",

    }



    self.service.spreadsheets().values().append(spreadsheetId=spreadsheet_id, range=range,
                                                    valueInputOption='RAW',
                                                    insertDataOption='INSERT_ROWS',
                                                    body=body).execute()

Post a Comment for "Invalid Json Payload Error With Python Google Sheets Api"