Everything You Need Before You Generate
Understand how Google Cloud private keys, session encryption, and QR pairing work — in plain language, before you open a terminal.
What the One-Line Command Automates for You
Turns on the YouTube Data API v3 and Gemini API in your Google Cloud project with the right quotas.
Generates your dedicated YouTube and Gemini API keys, labelled with your device suffix for easy identification.
Encrypts all keys with AES-256 using your session key and renders a QR code only your app can decrypt.
How to Manually Create a YouTube-Only API Key in Google Cloud
Prefer clicking step by step instead of running a Cloud Shell script? Follow this beginner-friendly guide to create a free Google Cloud API key restricted exclusively to YouTube Data API v3 (and nothing else).
Before you begin (3–5 minutes, no technical knowledge needed):
- 100% Free — no credit card needed: YouTube Data API v3 has a free daily quota (10,000 units/day). Ignore any Google prompt asking to activate a free trial or add a payment card.
- What you need: A regular Google (Gmail) account and a web browser (a computer is easiest, though a phone works too).
- YouTube services only: Step 5 locks your key so it can only talk to
YouTube Data API v3— never to Gemini AI, Gmail, Drive, or any paid Google service.
-
Open Google Cloud Console and sign in
Click the button below to open Google's official Cloud Console in a new tab and sign in with your regular Google account.
If this is your first visit, select your country, accept the Terms of Service, and click Agree and Continue. If a banner invites you to start a Free Trial or add billing details, simply close or skip it.
-
Create a new project (a folder for your key)
- At the top-left of the page (right next to the Google Cloud logo), click the project selector dropdown.
- In the popup window, click New Project in the top-right corner.
- In Project name, type a simple name such as
TubeLinkAI(leave Location / Organization unchanged as No organization) and click Create. - Wait a few seconds until the notification bell at the top-right finishes, then click Select Project so your new project is active.
-
Enable ONLY YouTube Data API v3
- Open the left navigation menu (
☰in the top-left corner) and go to APIs & Services → Library (or use the shortcut button below). - Type
YouTube Data API v3into the search box and click YouTube Data API v3 (by Google). - Click the blue Enable button and wait a few seconds until the service overview page loads.
- Do not enable any other APIs — this key is only for YouTube.
- Open the left navigation menu (
-
Create your API key
- In the left menu, click Credentials (under APIs & Services).
- At the top of the page, click + Create Credentials and choose API key.
- A popup titled API key created appears with a long string starting with
AIza.... Click the Copy icon next to it, and keep the popup open for the next step.
-
Restrict the key to YouTube services ONLY (Important)
- In the popup, click Edit API key (or close the popup and click the key name, e.g.
API key 1, in the Credentials list). - (Optional) Rename the key to something clear like
TubeLinkAI YouTube Only. - Under Set an application restriction, leave it on None so the Android app can use it normally.
- Under API restrictions, select Restrict key, open the Select APIs dropdown, tick ONLY
YouTube Data API v3, and click OK. - Scroll to the bottom and click Save.
Why this matters: With this restriction saved, your key is strictly limited to public YouTube Data API v3 requests. Even if someone ever saw the key, it cannot touch your Google account, Gmail, Drive, Gemini AI, or any paid service.
- In the popup, click Edit API key (or close the popup and click the key name, e.g.
-
Paste the key into TubeLink.ai and verify it
- Open TubeLink.ai on your phone and go to Settings → API Keys & Credentials → 1. Enter API Keys.
- Under YouTube Data API v3 Key, tap Enter Key (or Paste), paste your
AIza...key, tap Save Key, and then tap SAVE API KEYS at the bottom. - Wait 1 to 5 minutes for Google to activate the new key and its YouTube-only restriction worldwide.
- Return to API Keys & Credentials and tap 3. Test & Validate Active Keys → TEST ACTIVE KEYS NOW. You should see a green confirmation for YouTube Data API v3.
Google asks for a credit card or offers a Free Trial — do I need to pay?
No. You do not need to enter a credit card or enable billing to use YouTube Data API v3. Simply close or ignore the Free Trial banner. Google provides 10,000 free quota units per day per project.
The key test shows an error right after I clicked Save
Google Cloud usually needs 1–5 minutes to propagate a brand-new key and its API restrictions. Wait 2 minutes and tap TEST ACTIVE KEYS NOW again.
If it still fails, open the key again in Credentials and double-check two things: Application restrictions is set to None, and API restrictions has YouTube Data API v3 checked and saved.
How do I safely move the key from my computer to my phone?
Paste the key into a private note synced between your PC and phone (such as Google Keep or a private Saved Messages chat), copy it into TubeLink.ai, and then delete the note so the key remains stored only inside TubeLink.ai's encrypted storage.
Beginner's Guide & FAQ / Concept Overview
What is Google Cloud Platform (GCP) and what is a private API?
Google Cloud Platform (GCP) is Google's official developer cloud infrastructure where you can manage cloud projects and services (like YouTube and Gemini AI).
Private API (Application Programming Interface): Traditional applications often share a single developer key across thousands of users, causing frequent quota limit exceeded errors and slowdowns. By having your own free private API keys in Google Cloud, your TubeLink.ai app gets dedicated daily throughput solely for you, completely free and reliable.
What keys are generated and what are they used for?
This automated generator sets up two keys in your Google Cloud Project:
- YouTube Data API v3 Key: Allows the app to fetch playlists, channel video lists, metadata, and comments directly from YouTube at high speed.
- Google Gemini AI API Key: Powers direct comment summaries, sentiment highlights, and discussion analysis using Google's latest Gemini models.
Both APIs can be used free under Google's generous daily quotas (Free Tier).
Does the Gemini AI API key require billing or a credit card?
No, the Gemini API key is completely optional and supports both free and paid usage:
- Free Tier (No Billing Attached): 100% free with standard rate limits (e.g. 15 RPM) and access to select models, subject to Google AI Studio's free usage policies.
- Pay-as-you-go (Billing Attached): Attaching a payment method in Google Cloud unlocks higher request limits, access to a wider model catalog (including full Pro variants), and enterprise-grade privacy where prompts are not used to train Google models.
How does the session encryption key work and why is the QR code encrypted?
End-to-End Security (E2EE): Your secret API keys are never shown in plain text in your Cloud Shell terminal window.
- The script encrypts the keys using strong AES-256-CBC PBKDF2 encryption with your unique in-memory session key as the passphrase before generating the QR code.
- Where do I get the key? Open the pre-filled link from your TubeLink.ai mobile app (under Key Setup & Pairing) which fills the session key and device ID automatically.
- The session key lives in memory on your phone. If you scan a QR code after restarting the app, TubeLink will notify you that the session key expired and ask you to generate a new command.
What is Device Suffix / ID and is it required?
The Device Suffix / ID is completely optional.
It is used solely as a descriptive label suffix for your keys in the Google Cloud Console (e.g. TubeLink.ai_YouTube_Key_A1B2C3D4). This helps you distinguish which device owns which key if you use TubeLink.ai on multiple phones or tablets.
You can copy the suggested ID from the app, enter a custom name (e.g. phone, tablet), or click Random.
Why might a newly created key take a few minutes to activate?
After generating a new API key in Google Cloud, Google's global server network usually takes 1 to 5 minutes to propagate permissions worldwide.
TubeLink.ai never blocks saving your keys. If a propagation notice appears during your first API search, simply wait 2 minutes and retry, or run a live test in Settings > Test & Validate Active Keys.
Is my data sent to third parties when generating the QR code?
No secret ever leaves your machine in plain text. The command runs locally in your own Google Cloud Shell and encrypts the keys with your session key using AES-256-CBC PBKDF2.
If the local qrencode tool is unavailable, the script falls back to the public qrenco.de service to render the ASCII QR code. It only ever receives the encrypted payload, so your raw API keys and session key are never exposed.
Full Transparency — You Stay in Control
The generator is only a simplified, automated process — a convenience, not a requirement. You can do everything yourself, and you should verify anything you run:
- You can generate keys yourself Every step the script performs — enabling the YouTube Data API and Gemini API, creating keys — can be done manually with a few clicks in the Google Cloud Console. Read the step-by-step manual YouTube API key guide ↑
- Nothing hidden in the command The generated one-liner chains only official gcloud CLI calls in plain, readable bash — no obfuscation, no external calls with your data.
- Verify it with any AI tool If you have any doubts or concerns, paste the command into any AI assistant or code review tool and ask it to explain what it does before running it.
Ready to Put It into Practice?
Head back to the generator with a full picture of how private keys, encryption, and pairing work — your keys are 60 seconds away.