Inbox Reboot - To Do

 Create a Domain for project for console cloud google


How to Generate an OAuth 2.0 Client ID for Your Extension

This guide will walk you through creating the necessary credentials in the Google Cloud Console to allow your extension to use the Gmail API.

Step 1: Get Your Extension's ID

Before you start, you need the unique ID that Chrome has assigned to your extension.

  1. Open Chrome and go to the extensions page: chrome://extensions

  2. Make sure "Developer mode" is enabled (toggle in the top-right).

  3. Find your "Gmail AI Assistant" extension.

  4. Copy the ID (it will be a long string of letters, like aeblfdbeijboljppnpclcglclpdemjga). Keep this handy.

Step 2: Create a Google Cloud Project

  1. Go to the Google Cloud Console.

  2. Click the project selector dropdown at the top of the page and click "New Project".

  3. Give your project a name (e.g., "Gmail AI Assistant Project") and click "Create".

Step 3: Enable the Gmail API

  1. Make sure your new project is selected.

  2. In the search bar at the top, type "Gmail API" and select it from the results.

  3. Click the "Enable" button.

Step 4: Configure the OAuth Consent Screen

This is the screen users will see when asked for permission.

  1. From the navigation menu (☰), go to APIs & Services > Google Auth Platform.

  2. In the left-hand menu, click on "Branding".

  3. Choose "External" for the User Type and click "Create" (you may only need to do this the first time).

  4. Fill in the required fields:

    • App name: "Gmail AI Assistant"

    • User support email: Your email address

    • Developer contact information: Your email address

  5. Click "Save and Continue".

  6. You will be taken to the "Data Access" page (for Scopes). You don't need to add anything here. Click "Save and Continue".

  7. You will land on the "Audience" page (for Test Users). You also don't need to add anything here for now. Click "Save and Continue".

  8. Review the Summary and click "Back to Dashboard".

Step 5: Create the OAuth 2.0 Client ID

This is the final step to get your key.

  1. From the left navigation menu, click on "Clients".

  2. Click "+ Create OAuth client".

  3. For "Application type", select "Chrome App".

  4. Give it a name (e.g., "Gmail Extension Credentials").

  5. In the "Application ID" field, paste the Extension ID you copied in Step 1.

  6. Click "Create".

Step 6: Update Your manifest.json

  1. A popup will appear showing you your Client ID. Copy this entire value.

  2. Open your local manifest.json file.

  3. Replace the placeholder "YOUR_CLIENT_ID.apps.googleusercontent.com" with the Client ID you just copied.

  4. Save the manifest.json file.

  5. Go back to chrome://extensions, find your extension, and click the "Reload" button.

Your extension is now fully configured! The action buttons should now trigger the Google authentication flow the first time you use them.

Comments