# Creating your credentials

1 - Log in with your Google account in the reserved area where you can configure Google APIs, from this URL: <https://console.cloud.google.com/apis/library>

2 - If you already have projects created, just click on the selected project and then click on **NEW PROJECT**. If you don't have any project created, just search for a new project and create a new project.

![](https://help.scriptcase.net/galleryDocuments/edbsn724cd090ce2a0d7886a60fc9930413cfa93fa41e9205039cf7278c51068389942c4590ecfa72cecd5571313c5d2a02a5?inline=true)

3 - Enter the name of the project and click **CREATE**

![](https://help.scriptcase.net/galleryDocuments/edbsn15196e0a8ae2e171fa3edbcd846dc1f48d03b81f57a819f94000e77392c369c60a389e5a9b6f9dc62ee4df582debafa8?inline=true)

4 - After the project is created, you will be directed to the **OAuth** permission screen:

1. You must first click on the select project so that the project you just created is selected, as indicated by number **1** in the photo.
2. Choose the External option and click **Create**

![](https://help.scriptcase.net/galleryDocuments/edbsn538e7c27da4efc9475bbbc2aa9fe85ee3bac75a8bcf33fe95805bbc67fa4580dc594a147fab45912ae0a8c457dd17763?inline=true)

5 -  When you click on Create in step 4, you will see the following screen, and you will need to provide the necessary information; after providing the mandatory data, at the end of the page click on **Save and continue**.

![](https://help.scriptcase.net/galleryDocuments/edbsn6685e9cca454a73a0def4196098478fc2f5d3c8d0ca26ee1a7aadf2cce92893538f26d7dce3776dc02acc1c30b134b40?inline=true)

6 - On the next screen, click on save for the steps, and on the last one click on **BACK TO DASHBOARD** at the end of the page.

![](https://help.scriptcase.net/galleryDocuments/edbsn5bccdd934052075d44d01d2cfaf51069b4f9bec627a1cb6cfb901f4af0c54c929dd8c53b3820e1c5c4558fd52818ece2?inline=true)

7 - Now, you will need to activate the **Google Drive** and **Google Sheets APIs**, so go to **ENABLE APIS AND SERVICES**and click on**ACTIVE APIS AND SERVICES**

![](https://help.scriptcase.net/galleryDocuments/edbsn5880158c8b22c498776a227bfcc6f6d23ff44a8483b1d9e8e2b0de11ad908727653558b1becaef0949099a00fb8b0798?inline=true)

8 -  Look for **Google Drive** and **Google Sheets APIs** to enable

![](https://help.scriptcase.net/galleryDocuments/edbsnc03080e14d08dae38eba4bb04e59ca1bb9bbe2044e9b01045156fc9a690866c9b2bd5914832f2ac812e64566ac3062de?inline=true)

9 - Click to Enable Google Sheets API  
![](https://lh4.googleusercontent.com/NRWADHhArWQNRqr92c7NP1hUCAj81FwtUqPyMGGrUKZpJ0D81TcuXeCvTkZTLsHMbENlwQ26v7j1tjpkGOg9_8Le1jHN8h7XxHVnrgorKvJZRGBhHVoYcjD8yaMkD65eGl7nW1pe6XjpI9PrN7oG5gBIn76eCbmvihxxdpagZ_e_HOS2PMUQJTdc7OjKlw)  
  
10 - Click to Enable Google Drive API  
  
![](https://lh4.googleusercontent.com/XFRBhFC9ZOaapWwR8hw__YTCLNOZA_F_KxoXcv7EGPu9Twd6Eb5p0_4buWHZego2yHJWnt20OS02OuO0iKu3fZ-19f7XxyXa28wB7RjK7wTcbrRRqOX0KLdbJENbp_DopNtjhTlRM4zzM9rnNkhXY5oi3Ct6rHPprCazUbW_Mq5nkvbw-nC93cx5xZ6txA)

# **Using credentials in a local environment**

1 - After activating the APIs, click on the **“Credentials”** option

![](https://help.scriptcase.net/galleryDocuments/edbsn6579ac3d2d056d040b7ae26f35a3d118853f5bff5d36768fe4ec71e62792ecb70e441cd11c06dfe4d65eaf5731d4f96f?inline=true)

2 - Click on **"CREATE CREDENTIALS"** and then click on **"OAuth Client ID"** **.**

![](https://help.scriptcase.net/galleryDocuments/edbsn3348c27d0b55e4281dfc3646d4b329fed49c18d462bd5460f8ac2ec03aa83be67513a915066cda10d6310b858cc11d85?inline=true)

3 -  Select the option “**Computer App**”

![](https://help.scriptcase.net/galleryDocuments/edbsn6685e9cca454a73a0def4196098478fcb9c77cc0c42f7b8ae12f53293f726bf1cc1806f62379301e5d9d84ef647adfbc?inline=true)

4 - -  Enter the name and click on the “**CREATE**” button

![](https://help.scriptcase.net/galleryDocuments/edbsn15196e0a8ae2e171fa3edbcd846dc1f45c01e9650fd435d981c389d7ad20c80c891fc00a35490e42c561ce55e7c684dd?inline=true)

5 -  Download the **JSON** file

![](https://help.scriptcase.net/galleryDocuments/edbsn18099dbbb32761a5d407861624c33d686fc4b9d47170ec0ef00f8fa8a88d06442ac08b0f16dba62bcbcb454aef1c448b?inline=true)

6 - In the creation of the API, inform in **App name** the name of the application created in google and in **JSON OAUTH** the JSON code that is in the downloaded file.

![](https://lh5.googleusercontent.com/dMSSmFiozYtkxYr2_zEdOUFVoffNrRxDcWKfnu2Y2jYuxioLbLerxTO4OIV8yV8qtJ90SWPSgiwARrnvKpIj92vvydsPghSGhwJESeACXkGepV-iE1e043goIseUczvWy4ePucol7w1QojQhGRDLJkIJNGY6g3UwWbCmsTy1d0YzmisevENHIOuHn5NSFw)

7 - Click on the **“Auth Code”** option to get the code generated by the Google API. You will be redirected to a page, copy the code, paste it in the Auth Code field and click the **"Save"** button.

# Using credentials in an external environment

1 - To use your credentials in an external environment, go to the "**CREATE CREDENTIALS**" button again and select the option "**Help me choose**"

![](https://help.scriptcase.net/galleryDocuments/edbsn18099dbbb32761a5d407861624c33d6807644b61c344e992b18387ef4932bcb241f668c6c1ead23c51dac0450869ee84?inline=true)

2 - Select the options:

1. Select an API: **Google Sheets API**
2. Check the option: **User data.**
3. Click the **NEXT** button  
   ![](https://help.scriptcase.net/galleryDocuments/edbsn18099dbbb32761a5d407861624c33d6845b3681322ed1a5f9642589d2ee692366b0c468027ca0be5e93276c6f327d803?inline=true)

3 - On the scopes screen, click on the button to “**Add or remove scopes**”

![](https://help.scriptcase.net/galleryDocuments/edbsn5880158c8b22c498776a227bfcc6f6d26bfde1e18f1d7e22f344fe57e038d5b59d4ef1927d02d6ee842a6c6d179d3290?inline=true)

4 -  Enable all extensions containing the API name: **Google Drive API** and **Google Sheets API**. Click the button to “**Save and continue"**

**![](https://help.scriptcase.net/galleryDocuments/edbsn15196e0a8ae2e171fa3edbcd846dc1f48253f2b445116a517bbeafbadee209a4fc0e61d664df1ce0241ea1c808f65ed9?inline=true)**

5 - In the next step, select the option: “**Web application**” and inform the name of the application.

![](https://img.zohostatic.com/zde/static/images/caution.png)

NOTE: This name will be informed in the scriptcase API interface credentials

![](https://help.scriptcase.net/galleryDocuments/edbsnebb79e59c3564d20584ddd1f8580e3db884e54267e77ed825a31eee5309514fdf4c8f1827229f32301e0004439a6db61?inline=true)

6 - In the Redirect URL option, click to add your URL then click on the “**CREATE**” button.

Click **CONCLUDE** to finish the process.

![](https://img.zohostatic.com/zde/static/images/caution.png)

You need to add the full path.

**Example for the production environment:**

**<https://www.yourdomain.com/scriptcase9/prod/third/oauth/google-api-php-client-2.1.3/code.php>**

![](https://help.scriptcase.net/galleryDocuments/edbsn4cceda98cd0119fa5e73d883a171c1776f8cb03308f44008d3d059b7155ed402e63645177d1be946ee6a781b5eb6eb0a?inline=true)

7 -  Then just download the **JSON** file credentials to be informed in the scriptcase API.  
![](https://help.scriptcase.net/galleryDocuments/edbsnb012d87f28f0a2d939ab04d8fc602742828b1b5f84a869e02976ecadfd36029b8106ff1d2efbafeb3795ca36ead021f8?inline=true)  
  
  
8 - In the creation of the API, inform in **App name** the name of the application created in google and in **JSON OAUTH** the JSON code that is in the downloaded file.  
  
![](https://lh6.googleusercontent.com/zTtah5a3yUGwLUHjRrv26gshBsxPjtFuN-MfyuLeMg1btFPm8Vq30nAROEOjVX3eVOxPcbgI8HQXchcWdREwd7Rr0eNNu8BZKzq509KIkmWqAaXQ-EE_1uyqtc-xu2KJAJLH_BUJJVeJdtCI7cdi3bujPPMYAQt60Zu0Gi978xlOBh9v3s0va7C5xYSKyQ)  
  
  
9 - Click on the **“Auth Code”** option to get the code generated by the Google API. You will be redirected to a page, copy the code, paste it in the Auth Code field and click the **"Save"** button.