# OAuth 2.0 Client Credentials

## **Configuring Consent Screen for OAuth 2.0 Client Option**

To create OAuth credentials first configure the consent screen. As the name explains, this set of configurations reflects the information of the user, the app, and what sort of permissions the user agrees or consents to be accessed from their Google Drive.

* To create credentials, navigate to the APIs & Services→Credentials panel in Cloud Console.

<figure><img src="https://media.langstack.com/documentation/media/images/connector/googledriveconnector/gdcrtcredmenu.png" alt=""><figcaption></figcaption></figure>

* Click \[Configure Consent Screen].

<figure><img src="https://media.langstack.com/documentation/media/images/connector/googledriveconnector/gdconfigconsentscreen.png" alt=""><figcaption></figcaption></figure>

* The "OAuth consent screen" page appears.&#x20;

<figure><img src="https://media.langstack.com/documentation/media/images/connector/googledriveconnector/gdoauthconsscreen.png" alt=""><figcaption></figcaption></figure>

* Click the User Type for your app. Select "External".

<figure><img src="https://media.langstack.com/documentation/media/images/connector/googledriveconnector/gdoauthconsscrselexternal.png" alt=""><figcaption></figcaption></figure>

* Click \[Create].&#x20;

<figure><img src="https://media.langstack.com/documentation/media/images/connector/googledriveconnector/gdoauthcsclickcrt.png" alt=""><figcaption></figcaption></figure>

* The "Edit app registration" screen displays.

<figure><img src="https://media.langstack.com/documentation/media/images/connector/googledriveconnector/gdeditappreg.png" alt=""><figcaption></figcaption></figure>

* Under OAuth Consent Screen, fill out the relevant details in the "App information" section.
  1. Name in the App name field.
  2. Personal email address in the User support email field.

<figure><img src="https://media.langstack.com/documentation/media/images/connector/googledriveconnector/gdoauthcappinfo.png" alt=""><figcaption></figcaption></figure>

* Scroll down to the "Developer contact information" field.
  1. Enter the email address
  2. Click "Save and Continue".&#x20;

<figure><img src="https://media.langstack.com/documentation/media/images/connector/googledriveconnector/gddevemail.png" alt=""><figcaption></figcaption></figure>

* The "Scopes" page appears. Click the \[Add or remove scopes] button. \
  This allows the user to add or remove the permissions on the types of data that is accessible.

<figure><img src="https://media.langstack.com/documentation/media/images/connector/googledriveconnector/gdaddremscopes.png" alt=""><figcaption></figcaption></figure>

* In "Update selected scopes", filter "Google Drive API".

<figure><img src="https://media.langstack.com/documentation/media/images/connector/googledriveconnector/gdupdselectedscopes.png" alt=""><figcaption></figcaption></figure>

* Select the required scopes. These scopes are the permission settings for the files to be accessed on the Drive.
  * For downloading, uploading, and connecting, check the “ “/auth/drive” checkbox. This defines that the connector has all the required permissions.&#x20;
  * Other checkbox can be checked as well, including:
    * “/auth/docs”
    * “/auth/drive.metadata”
    * “/auth/drive.metadata.readonly”
    * “/auth/drive.readonly”, and
    * “/auth/drive.install”.

<figure><img src="https://media.langstack.com/documentation/media/images/connector/googledriveconnector/gdgdscopes.png" alt=""><figcaption></figcaption></figure>

* Click \[Update].

<figure><img src="https://media.langstack.com/documentation/media/images/connector/googledriveconnector/gdgdscopesupdate.png" alt=""><figcaption></figcaption></figure>

* A list of scopes for your app appears. Click \[Save and Continue].&#x20;

<figure><img src="https://media.langstack.com/documentation/media/images/connector/googledriveconnector/gdnonsensitscopes.png" alt=""><figcaption></figcaption></figure>

* The “Test users” page appears. Add a test user which can authorize if the app is in testing. Click "\[+ ADD USERS]".&#x20;
*

```
<figure><img src="https://media.langstack.com/documentation/media/images/connector/googledriveconnector/gdaddtestusers.png" alt=""><figcaption></figcaption></figure>
```

* Add the email and click add.

<figure><img src="https://media.langstack.com/documentation/media/images/connector/googledriveconnector/gdoauthconsentaddusers.png" alt=""><figcaption></figcaption></figure>

* Click \[Save and Continue]. The "Summary" appears which will show all the settings.

<figure><img src="/files/YBNbMlFkLr8WpucFbuGz" alt=""><figcaption></figcaption></figure>

* OAuth consent screen is created successfully and a summary is displayed.

## Creating OAuth Credentials

* Navigate to the APIs & Services→Credentials panel in Cloud Console.The "Credentials" page appears.
*

```
<figure><img src="https://media.langstack.com/documentation/media/images/connector/googledriveconnector/gdcreatecredmenu.png" alt=""><figcaption></figcaption></figure>
```

* Click \[+ Create Credentials] and select OAuth client ID. The "Create OAuth client ID" page appears.

<figure><img src="https://media.langstack.com/documentation/media/images/connector/googledriveconnector/gdcreatecredoauth.png" alt=""><figcaption></figcaption></figure>

* Click the Application type drop-down list and select Web Application.

<figure><img src="https://media.langstack.com/documentation/media/images/connector/googledriveconnector/gdoauthclidwebapp.png" alt=""><figcaption></figcaption></figure>

* In the name field, type a name for the credential. This name is only shown in the Cloud Console.

<figure><img src="https://media.langstack.com/documentation/media/images/connector/googledriveconnector/gdoauthclidname.png" alt=""><figcaption></figcaption></figure>

* Click the \[Create] button.

<figure><img src="https://media.langstack.com/documentation/media/images/connector/googledriveconnector/gdoauthclickcreate.png" alt=""><figcaption></figcaption></figure>

* An OAuth client is created. Save the following generated unique details which would be required while creating the Google Drive connector in Langstack cloud:
  1. Client ID
  2. Client Secret

<figure><img src="https://media.langstack.com/documentation/media/images/connector/googledriveconnector/gdoauthclicred.png" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.langstack.com/welcome/in-depth-learning/connectors/google-drive-connector/setting-up-gcp-account-gcp-project-api-enablement-and-credentials-prerequisites/oauth-2.0-client-credentials.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
