Google Spreadsheet Credential

kelly woo
3 min readJan 11, 2021

To access spreadsheet of other apps over APIs, you need to make a credential.
I usually store language packs on spreadsheet and wrap it to json on my project. This is about how you create credentials.

| Create Project.

Visit https://console.developers.google.com/projectcreate to create a project

I named project name i18nManger
When you click CREATE it will jump to Credentials

| Create Credential

If you failed to go to Credentials, you can access it by menu
(Move to APIs & Services > Create Credentials > Service Account)

You don’t want to use Service Account, move back to the menu above and select other options (API Key or OAuth Client ID), but it is better to use Service Account and That’s what we’re gonna do. Let’s fill the form.

Now you see the account under Service Accounts Menu
You need to download service key.

Click Manage service accounts and Create Key

Set Key Type JSON on the Modal

Content of json file looks like this.

{   
type: "service_account",
project_id: string;
private_key_id: string;
private_key: string;
client_email: string;
client_id: string;
auth_uri: string;
token_uri: string;
auth_provider_x509_cert_url: string;
client_x509_cert_url: string;
}

| Add APIs

Now you need to add api libraries. Move APIs & Services > Library

Search APIs

You can find Google Drive API and Google Sheets API and enable them

Now you got the credentials and access to any apps on the library via APIs.

:)

--

--