Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error 403 on Google Sheets API

The URL

https://sheets.googleapis.com/v4/spreadsheets/[ID_OF_SPREADSHEET]?key=[MY_API_KEY]

What I get

   {
      "error": {
        "code": 403,
        "message": "The caller does not have permission",
        "status": "PERMISSION_DENIED"
      }
    }

At the moment, I have no Key Restriction on my API Key for the sake of testing.

I've had a look at a past question that's been popular but no luck.

like image 567
Nazar Abubaker Avatar asked Mar 15 '17 10:03

Nazar Abubaker


3 Answers

i faced same issue in my electron app

i just did

https://console.developers.google.com/

then

choose library->google sheet->enable 

thats it started working to me

like image 200
ßãlãjî Avatar answered Nov 07 '22 23:11

ßãlãjî


This is similar to this 403 error in Drive API wherein you have insufficient permission. By that, you need authentication and authorization using OAuth. There are quickstart guides which has implementation in JavaScript, Python,etc.

To prove this, go to auth playground and get the permissions for 'Google Sheets API v4'. Follow the steps and place your URI request in Step 3. You shouldn't have problems performing operations after that.

Check this SO thread for additional reference on how to use OAuth Playground.

like image 32
noogui Avatar answered Sep 20 '22 12:09

noogui


This is similar to this 403 error in Drive API wherein you have insufficient permission. By that, you need authentication and authorization using OAuth. There are quickstart guides which has implementation in JavaScript, Python,etc.

To prove this, go to auth playground and get the permissions for 'Google Sheets API v4'. Follow the steps and place your URI request in Step 3. You shouldn't have problems performing operations after that.

Check this SO thread for additional reference on how to use OAuth Playground.

like image 1
ReyAnthonyRenacia Avatar answered Nov 07 '22 22:11

ReyAnthonyRenacia