Tutorial: Perspective API Key

This tutorial will explain how to obtain the required Google Perspective API key for the toxicity analysis on Communalytic.

Step 1

To begin, click on the “My Profile” button in the upper-right corner of the homepage.

Step 2

From here, look for a section called “API keys”. If you already have an API key for Google Perspective, click the “enter key” button to add your API key. If you don’t have a Perspective API key, we will explain how to apply for one from Google. We recommend using a personal Gmail account to request an API key, some institutional emails may block Google Cloud console / API key requests.

To request access to the API, please visit the Perspective API Developer Home Page to begin the process of obtaining your Perspective API key.

Note: As it might take a few days to get approval from Google, plan ahead and request access ASAP.

Step 3

Go to the “Google Cloud console” on the Perspective API Developer Home Page, then click on it. It will take you to the Google Cloud console.

Step 4

If you haven’t used Google API’s before, you will need to create a new project. Click the “Create Project” button on the right to open a new project.

Step 5

From here, begin by creating a name for your project. Also, note that when using an institutional/university Google account to create a Google project, you may need to request permission from your domain administrator to create a project. If you have a personal Gmail account, we recommend using it here.

When you have completed the form, click “Create”.

Step 6

After you created a new Google Cloud project, you will need to apply for academic access to Perspective API via this online form.

Google will send you an email confirmation once your request is approved.

Please note that Perspective API is a service provided by Google, so any questions about this API should be direct to Google using their contact form.

Step 7

Once you have created a new project and your Perspective API access request has been approved, you can now click the “API library” link.

Step 8

From here, type “perspective” in the search bar to search for “Perspective Comment Analyzer API”.

Step 9

When Perspective Comment Analyzer API pops up, click on it.

Step 10

On the Perspective Comment Analyzer API homepage, click “Enable“.

Step 11

After your “Perspective Comment Analyzer API” has been enabled, you will need to obtain your API key. To do so, begin by clicking the “Credentials” button on the top left corner of your browser.

Step 12

Then, select the “Credentials in APIs & Services ” link below the title.

Step 13

From here, click “Create Credentials” to open the drop-down menu. Then choose the first option: “API Key”.

Step 14

This is your API key for Google Perspective Service. Copy the link and close the pop-up.

Step 15

Return to your Communalytic profile page and click “Enter Key”. Paste or type your API key into the text box and click “Submit”. Now your API key is all set.

Step 16

Now you’re ready to conduct Toxicity Analysis with your data.

You can also remove your key at any time using the “remove key” button.