-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Google Extension
Antonin Delpeuch edited this page Nov 11, 2024
·
11 revisions
If you were directed to this page while trying to sign-in to access Google Sheets or Google Drive, it means that your Google API OAuth credentials are missing or invalid. OpenRefine 3.8.3 and later are no longer distributed with default credentials included, so you will need to obtain your own if you would like to use this functionality.
To obtain data from Google Drive or Google Sheets for OpenRefine requires OAuth credentials. For obtaining the OAuth credentials follow these steps:
- Go to the Google API Console
- Click on Create Project.
- Pick a project name such as My OpenRefine Dev Project.
- Fill the required fields.
- Hit Create for creating the project.
- Pick Enable APIs and Services.
Enable the following services:
- Google Sheets API
- Google Drive API
OAuth consent screen pane:
- Go to the OAuth consent screen pane.
- As user type, pick External.
- Fill the form for the OAuth credentials.
- For the OAuth scopes, pick ../auth/drive/ which will give you write access to your Google Drive.
- For the domain (and other URLs), you can pick anything (since the localhost will be allowed anyway).
- Hit Save to save the consent screen.
Credentials pane:
- Go to the Credentials pane.
- Create new OAuth credentials, adding as allowed origin
http://127.0.0.1:3333
, and as allowed callback URL:http://127.0.0.1:3333/extension/gdata/authorized
- Copy your client id, client secret key
- Go back to the Credentials Pane, and create a new API key. Copy its value.
- Save them in a file outside your git clone of OpenRefine.
- Add Java property definitions for your client id and secret key by adding
-Dext.gdata.clientid=<yourid>
-Dext.gdata.clientsecret=...
-Dext.gdata.apikey=...
to your JVM arguments. This can be done by editing therefine.ini
file at the root of the code base.