How to generate the youtube credentials

  Updated May 2026Mewayz

How To Generate The YouTube Credentials

Learn how to generate YouTube API credentials using Google Cloud Console.

Step 1: Create a Google Cloud Project

  1. Visit: https://console.cloud.google.com/
  2. Click the project dropdown (top left) → “New Project”
  3. Name your project (e.g., YouTube Integration) and click “Create”

Step 2: Enable the YouTube Data API v3

  1. After your project is created, go to: https://console.cloud.google.com/apis/library/youtube.googleapis.com
  2. Click “Enable”
  3. You also need to enable the YouTube Data API V3 version and the YouTube Analytics API.

Step 3: Configure OAuth Consent Screen

  1. Go to: OAuth Consent Screen
  2. Choose “External” if your app will be used by others outside your organization.
  3. Fill in:
  1. Save and continue (you can skip scopes for now or add later)
  2. Under “Test users”, add the Gmail account(s) you’ll use to test.

Step 4: Create OAuth 2.0 Client Credentials

  1. Go to: Credentials Page
  2. Click “Create Credentials” → OAuth client ID
  3. Choose “Web application”
  4. Set a name (e.g., Laravel YouTube Integration)
  5. Under Authorized redirect URIs, add your redirect URL, e.g.:

``` http://localhost:8000/google/callback ```

``` https://yourdomain.com/google/callback ```

  1. Click Create

Step 5: Copy Your Credentials

  1. After creation, you’ll get:
  1. Save these in your Laravel .env file or settings table:
Was this helpful?