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 begin the process of obtaining your API key, click “these steps” and open the link in a new tab.

Step 3

Here, find the hyperlink for “Google Cloud console” on the 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.