> For the complete documentation index, see [llms.txt](https://docs.langstack.com/welcome/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.langstack.com/welcome/in-depth-learning/connectors/google-drive-connector/setting-up-gcp-account-gcp-project-api-enablement-and-credentials-prerequisites/api-key-credentials.md).

# API Key Credentials

## Creating an API Key

To create an API key:

* Navigate to the APIs & Services→Credentials panel in Cloud Console.

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

* In the selected project, click \[+ Create Credentials], then select API key from the drop down menu.

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

* The API key created dialog box displays your newly created key. Copy the key and enter it in the Google Drive connector in Langstack.

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

* Click \[Close] to close the dialog box.&#x20;

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

* To restrict the key to use only with the Google Drive API, click the edit icon displayed under actions of the listed API key.

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

* In the API Restrictions section, select the \[Restrict Key] radio button.

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

* When the user selects \[Restrict Key], a field with a list of APIs appears.&#x20;

  * Select the Google drive API option.
  * Click \[OK].
  *

  ```
  <figure><img src="https://media.langstack.com/documentation/media/images/connector/googledriveconnector/gdapikeyrestrictgdapi.png" alt=""><figcaption></figcaption></figure>
  ```
* After clicking "OK":
  1. It displays “1 API”. (If a user selects more APIs, the number of APIs selected appears in this field.)
  2. Click the \[Save] button to save it.

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