简体   繁体   中英

Connection between Jupyter Notebook and Gsheet - Failed - HttpError 403 Error

I m completetly new using Google Cloud Platform and APIs so I don t know how to fix this issue. I`m trying to connect my Jupyter notebook with a google sheet so I can connect a dataset on Jupyter to Gsheet.

I made all the connections and didn`t get any error, for my last step I used the code below:

from df2gspread import df2gspread as d2g
wks_name = 'Jupyter Manipulated Data'
    d2g.upload(df_apn1, wks_name, credentials=credentials, row_names=True)

and received this error:

HttpError: <HttpError 403 when requesting https://www.googleapis.com/drive/v3/files/root?fields=id&alt=json returned "Insufficient Permission: Request had insufficient authentication scopes.">

I haven t found any solution here that could fix this and, as I said before, I don t have experience with this so I really have no idea how to fix it. I made sure that everything that was suppose to be enable is so this is not the issue.

Does anybody know how to fix this?

Thank you

Make sure that the credentials created have the right scope. The specific information about scopes when using Google Sheets can be found here .

This medium article serves as a very nice tutorial.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM