I am trying to access my google Spreadsheet using oauth2 using the gspread Python Library.I am new to Oauth2 and understand its benefits.But I am unable to use it.So far I have visited https://code.google.com/apis/console/ and generated CLIENT ID,SECRET and REDIRECT URI.
credentials = SignedJwtAssertionCredentials('[email protected]', SIGNED_KEY, scope)
According to the Gspread Docs I will need a SIGNED_KEY object.How do I get that?
An example will be very helpful.
In the developer console, (https://console.developers.google.com) go to APIs & auth > Credentials and click Create new Client ID, then choose Service Account. Your browser should download a .p12 file. Now convert it to a PEM for GAE by doing this in the command line:
You then have to move the PEM to your app directory, open it in your app code and then use it as the second arg in
SignedJwtAssertionCredentials
Also make sure the
app.yaml
libraries section includespycrypto
I got this from someone's very helpful tutorial