@devries-cameron20 / composio Mirror · read-only
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 21, 06:00 UTC

next
md 79 lines 6.52 KB
Rendered Raw
1 ## How do I set up custom Google OAuth credentials for YouTube?
2
3 Use your own Google OAuth app when you want your app name on the consent screen, full control over the requested scopes, or your own YouTube API quota (see the quota question below).
4
5 ### Create the Google OAuth app
6
7 1. In [Google Cloud Console](https://console.cloud.google.com/), select the project that will own the OAuth client, or create one.
8
9 ![Google Cloud console project picker](/images/toolkits/shared/hjaj4jg5CtBRolXXYddY8NDXCes.webp)
10
11 2. Open **APIs & Services** → **Library**, search for **YouTube Data API v3**, and select **Enable**. If the page shows **Manage**, the API is already enabled. See Google's [server-side web app guide](https://developers.google.com/youtube/v3/guides/auth/server-side-web-apps).
12
13 ![YouTube Data API v3 page in the API Library with the Enable button](/images/toolkits/youtube/enable-youtube-data-api.webp)
14
15 3. Open **Google Auth Platform** → **Branding**. If Google shows **Get started**, enter the app name, user support email, and developer contact email, then save.
16
17 ![Google Auth Platform Branding page with app name and user support email](/images/toolkits/shared/x4VkWS3iceKKFGyjlFN1THrtTRQ.webp)
18
19 4. Open **Audience**. Choose **Internal** to limit the app to users in your Google Workspace organization, or **External** for consumer accounts and users outside it. While an external app's publishing status is **Testing**, only accounts listed under **Test users** can connect, so add every account you'll test with.
20
21 ![Google Auth Platform Audience page with Testing status, External user type, and Test users](/images/toolkits/shared/Jttbz3Cm6xJFWNlukXLGTxWjf6c.webp)
22
23 5. Open **Data Access** → **Add or remove scopes** and add the scopes listed under **Scopes** below. If a scope isn't in the list, paste its full URL under **Manually add scopes** and select **Add to table**. Select **Update**, then **Save**.
24
25 ![Data Access scope picker with the youtube.readonly scope selected](/images/toolkits/youtube/data-access-youtube-scope.webp)
26
27 6. Open **Clients** → **Create client**, choose **Web application**, and give it a name.
28
29 ![Create OAuth client ID form with Web application selected and a client name](/images/toolkits/shared/sA0bvCBPtMCWw8lqecCrx76Dyc.webp)
30
31 7. Under **Authorized redirect URIs**, add `https://backend.composio.dev/api/v1/auth-apps/add`. It must exactly match the `oauth_redirect_uri` field on your Composio auth config.
32
33 ![OAuth client form with the Composio redirect URI under Authorized redirect URIs](/images/toolkits/shared/jDTS80dlfwHF6u1WAQhBdnjTrI.webp)
34
35 8. Select **Create**. Copy the **Client ID** and **Client secret**. Google shows the full secret only once, so save it before you close the dialog.
36
37 ![OAuth client created dialog with the Client ID and Client secret](/images/toolkits/shared/YdKWAswsL2nVXnSbA4zgBUDmwA.webp)
38
39 ### Create the auth config in Composio
40
41 1. In the [Composio dashboard](https://dashboard.composio.dev/~/project/auth-configs?utm_source=docs&utm_medium=content&utm_campaign=toolkits-youtube), open **Auth Configs** → **Create** and select **YouTube**.
42
43 ![Composio Auth Configs page with the Create button](/images/toolkits/shared/DUtMN0UWIU2kEqnvS5DvD7qhWU.webp)
44
45 ![Create Auth Config dialog with YouTube in the search results](/images/toolkits/youtube/select-youtube-toolkit.webp)
46
47 2. Choose **OAuth 2.0** and **Your Own Credentials**, then paste your **Client ID** and **Client secret**. Leave **Redirect URI** unchanged, keep the scopes in line with what you added in Google, and select **Create Auth Config**.
48
49 ![YouTube auth config form with Client ID, Client secret, Redirect URI, and the youtube.readonly scope](/images/toolkits/youtube/auth-config-credentials.webp)
50
51 3. Open the auth config, select **Connect Account**, and sign in. If Google asks, pick the YouTube channel or Brand Account you want to connect.
52
53 ![Google consent screen asking to view your YouTube account](/images/toolkits/youtube/google-consent-screen.webp)
54
55 4. Open **Accounts** on the auth config and confirm the connected account shows **Active**. The auth config's own **Enabled** label doesn't confirm a connection.
56
57 ![Composio auth config panel with the YouTube connected account shown as Active](/images/toolkits/youtube/connected-account-active.webp)
58
59 For the general flow, see [Custom auth configs](/docs/auth-configuration/custom-auth-configs).
60
61 ### Scopes
62
63 The default auth config requests these scopes under `https://www.googleapis.com/auth/`: `youtube`, `youtube.readonly`, `youtube.force-ssl`, `youtube.upload`, `youtube.channel-memberships.creator`, `youtubepartner`, and `youtubepartner-channel-audit`. To only read channel data, `youtube.readonly` is enough. Uploads, content management, memberships, and partner operations need their own scopes and, for some, YouTube eligibility. See Google's [YouTube authentication guide](https://developers.google.com/youtube/v3/guides/authentication).
64
65 Short scope names on this page leave out the `https://www.googleapis.com/auth/` prefix. When you paste a scope under **Manually add scopes**, use the full URL, for example `https://www.googleapis.com/auth/userinfo.email`. Scopes already written as a full URL, such as `https://mail.google.com/`, go in as shown.
66
67 ### Publish and verify the app
68
69 While an external app is in **Testing**, Google shows an unverified-app notice and refresh tokens expire after seven days, so users have to reconnect. Before you invite production users, select **Publish app** on the **Audience** page. A public app that requests sensitive or restricted scopes also needs Google's OAuth verification, which you start from **Verification Center**. Publishing doesn't complete verification on its own. Internal apps and apps in Testing can be exempt. See Google's [verification requirements](https://developers.google.com/identity/protocols/oauth2/production-readiness/overview).
70
71 ![Google hasn't verified this app notice for an app in Testing](/images/toolkits/shared/M0mS4XrLbK5mU52ry578MBa7M.webp)
72
73 If you change the requested scopes later, reconnect the account so the user grants the new access.
74
75 ## Why am I getting quota errors on YouTube?
76
77 YouTube enforces strict API quotas. If you use the managed/default OAuth app, that quota can be shared across users, so production workloads can hit provider quota limits faster than expected.
78
79 For production, create your own Google Cloud OAuth app and use those credentials in the YouTube auth config. That gives your project its own YouTube API quota and lets you control scopes, branding, and quota increase requests in Google Cloud.