I am accessing google spread sheets using c#.
Actually they are 3 ways to access the spread from https://console.developers.google.com/ .
I am using the service account credentials to access the google spread sheet.I have created a project in https://console.developers.google.com/, I enabled the sheet API and I also created new service account credentials , P-12 file is downloaded to my machine. At the particular point of code shown below
SpreadsheetsResource.ValuesResource.GetRequest request = service.Spreadsheets.Values.Get(spreadsheetId, range);
ValueRange response = request.Execute();
When I try to pull data from Google Spread sheet, it goes through the authorization process, which appears to work properly. Then it fails with:
An unhandled exception of type 'Google.GoogleApiException' occurred in Google.Apis.dll Additional information: Google.Apis.Requests.RequestError The caller does not have permission [403] Errors [ Message[The caller does not have permission] Location[ - ] Reason[forbidden] Domain[global] ]
I've been struggling with this for a few hours. I've double checked that the credentials is being used, and is authorized on Google Spread sheets. Am I missing anything ?