Overview
What this setup is for
Use this only if you want the desktop app to use your own YouTube API quota instead of Social Stream Ninja's default shared project.
Important: all 3 values below must come from the same Google Cloud project:
- OAuth Client ID
- OAuth Client Secret
- API Key
Do not confuse these two fields in Google Cloud:
- Authorized JavaScript origins must be just the origin, with no path.
- Authorized redirect URIs must include the full
/sources/websocket/youtube.htmlpath.
Step 1
Create the project
- Open Google Cloud Console.
- Create a new project or pick a dedicated existing one.
- Enable YouTube Data API v3.
- Open the OAuth consent screen settings.
- If the app is in testing, add your Google account as a test user.
Step 2
Create the OAuth client
- Create credentials.
- Choose OAuth client ID.
- Use type Web application.
- Add the exact origins and redirect URIs shown below.
| Field | Value |
|---|---|
| Authorized JavaScript origins | http://localhost:8181http://localhost:8080 |
| Authorized redirect URIs | http://localhost:8181/sources/websocket/youtube.htmlhttp://localhost:8080/sources/websocket/youtube.html |
Step 3
Create the API key safely
- Create an API key in the same project.
- Open that key's restrictions.
- Under API restrictions, restrict it to YouTube Data API v3 only.
- Do not use HTTP referrer restrictions for the desktop app.
Desktop app rule: HTTP referrer restrictions are for browser pages, not this local desktop auth flow.
Step 4
Paste the values into the desktop app
- Open the YouTube source page inside the desktop app.
- Paste the OAuth Client ID, OAuth Client Secret, and API Key.
- Click Save.
- Sign out if needed.
- Click Sign in with YouTube.
- Complete the Google login in the external browser window.
Expected result: if everything matches, Google sign-in works and the desktop app uses your saved YouTube project instead of the default shared one.
Security
Keep the credentials safe
- Treat the Client Secret and API key as sensitive.
- Do not paste them into screenshots, chat logs, or bug reports.
- If you accidentally expose them, rotate or delete them.
- Use a dedicated test project if you are experimenting.
- Delete temporary projects once you are done testing.
Troubleshooting
Common problems
redirect_uri_mismatch: the redirect URI is not an exact match.invalid_client: the Client ID and Client Secret do not match.quotaExceeded: your API key project is out of YouTube quota.- Account validation failed: on older builds, this could happen when OAuth and API key came from different projects.