How to Create Service Account JSON and Enable Google Drive API

🔧 STEP 1: Create a Project in Google Cloud Console

  1. Go to: https://console.cloud.google.com/
  2. Sign in with your Google account.
  3. Click “Select a project” > “New Project”.
  4. Enter a project name and click Create.

📁 STEP 2: Enable Google Drive API

  1. Go to: Google API Library.
  2. Select your project from the top dropdown.
  3. Search for Google Drive API.
  4. Click it → then click Enable.

🧑‍💼 STEP 3: Create a Service Account

  1. Go to: Service Accounts.
  2. Select your project.
  3. Click Create Service Account.
  4. Enter a name like drive-api-service.
  5. Click Create and Continue.
  6. Click Continue again (skip permissions), then click Done.

🗝️ STEP 4: Create and Download Service Account JSON Key

  1. In the service account list, click the one you just created.
  2. Go to the Keys tab → click Add Key > Create new key.
  3. Select JSON and click Create.
  4. A JSON file will download – save this securely.

✅ Sample JSON Preview

{
  "type": "service_account",
  "project_id": "your-project-id",
  "private_key_id": "xxxxxxxxxxxxxxxxxx",
  "private_key": "-----BEGIN PRIVATE KEY-----\\nYOUR_KEY\\n-----END PRIVATE KEY-----\\n",
  "client_email": "your-service-account@your-project.iam.gserviceaccount.com",
  "client_id": "1234567890"
}
  

🗝️Finally : Please share Team Drive Folder for “client_email”

"client_email": "your-service-account@your-project.iam.gserviceaccount.com".
Screenshot 2025-08-06 at 16.26.59