How to use Google credentials with CodeExchange Quick Deploy

April 12, 2021
Written by
Sam Agnew
Twilion

Copy of Generic Blog Header 3(5).png

You're probably here because you:

  • want to launch a Twilio app in minutes
  • don't want to use your own servers or write (complex, third-party) code to 
  • want to use Google Sheets to store interactions with your Twilio phone number

You're in the right place! First, make sure to check out Twilio's Google Sheets Quick Deploy app in CodeExchange.

Before interacting with Google Drive services like Sheets from your Twilio app, you need to prove to Google that your app is authorized to access your data. This blog post will walk you through how you can fetch your Google credentials and launch this app within minutes.

Creating a Service Account

The first thing you need to do is create a Google Project before moving on. In this example, I'll use the name "Twilio Sheets".

Creating a project

Next, from your project dashboard, in the menu on the left, navigate to IAM & admin -> Service Accounts.

Navigating to Service Accounts

From here, you'll want to click CREATE SERVICE ACCOUNT

Creating a service account

And fill out the information requested. I named mine "twilio-sheets" for example.

Service account details

Feel free to leave the optional sections blank.

Gathering your credentials

Click on the Service Account you just made and click on the KEYS tab.

Viewing your credentials

In here, click to create a new key and select "JSON" as the type of key.

Creating a JSON API Key

This will automatically download a JSON file to your computer. This is a sensitive file and should not be pushed to any public repository.

Using your credentials in CodeExchange

Next, open this file and copy the contents. You can do this by highlighting all the text, right-clicking and clicking “Copy”.

Then, go back to your CodeExchange app and paste this into the textbox that says “Google credentials”

Screen Shot 2021-05-14 at 10.17.15 AM.png

And you’re done! You can continue through the rest of the app to get your Quick Deploy app launched.

Extra steps if you are using Google Sheets

If your project is using Google Sheets in particular, you should also do the following to make sure everything works correctly:

With those taken care of, you should be ready to go.