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

next
md 57 lines 5.46 KB
Rendered Raw
1 ## How do I set up custom Google OAuth credentials for NotebookLM?
2
3 Use your own Google OAuth app when you want your app name on the consent screen, your own API quota, or full control over the requested scopes.
4
5 NotebookLM connects to an existing Gemini Notebook Enterprise deployment in the Global location. The user needs an active license and the **Cloud NotebookLM User** role in the deployment project. See Google's [Notebook Enterprise API prerequisites](https://docs.cloud.google.com/gemini/enterprise/notebooklm-enterprise/docs/api-notebooks).
6
7 ### Create the Google OAuth app
8
9 1. In [Google Cloud Console](https://console.cloud.google.com/), select the project that will own the OAuth client, or create one.
10
11 ![Google Cloud console project picker](/images/toolkits/shared/9j8wjr2HocIhIsgedntpgb4m8Y.webp)
12
13 2. Open **APIs & Services** → **Library**, search for **Discovery Engine API** (`discoveryengine.googleapis.com`), and select **Enable**. If the page shows **Manage**, the API is already enabled. Enable it in the project that hosts your Notebook Enterprise deployment.
14 3. Open **Google Auth Platform** → **Branding**. If Google shows **Get started**, enter the app name, user support email, and developer contact email, then save.
15
16 ![Google Auth Platform Branding page with app name and user support email](/images/toolkits/shared/Q8INvnJoiCMyajqrrAtq6ovCE5U.webp)
17
18 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.
19
20 ![Google Auth Platform Audience page with Testing status, External user type, and Test users](/images/toolkits/shared/BetTxXqa2c1dgg4QeV4g9RV008.webp)
21
22 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**.
23 6. Open **Clients** → **Create client**, choose **Web application**, and give it a name.
24
25 ![Create OAuth client ID form with Web application selected](/images/toolkits/shared/S7mFFv6C5mCP4y0ScTzRzQd8Nc.webp)
26
27 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.
28
29 ![OAuth client form with the Composio redirect URI under Authorized redirect URIs](/images/toolkits/shared/1qh7A0aEGRUU1K19aU37FrcxTY.webp)
30
31 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.
32
33 ![Google OAuth web client details with Client ID and Client secret](/images/toolkits/shared/TmVTLOgVKQDqamjQVxKDBXJtPQ.webp)
34
35 ### Create the auth config in Composio
36
37 1. In the [Composio dashboard](https://dashboard.composio.dev/~/project/auth-configs?utm_source=docs&utm_medium=content&utm_campaign=toolkits-notebook_lm), open **Auth Configs** → **Create** and select **NotebookLM**.
38 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**.
39 3. Open the auth config, select **Connect Account**, and enter the Google Cloud project ID or numeric project number that hosts the Notebook Enterprise deployment. Then sign in. If the connection fails, check the Global location, the user's license, the Discovery Engine API, and IAM access in that project.
40
41 ![Google consent screen asking to view, edit, create, and delete your Discovery Engine data](/images/toolkits/notebook_lm/google-consent-screen.webp)
42
43 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.
44
45 For the general flow, see [Custom auth configs](/docs/auth-configuration/custom-auth-configs).
46
47 ### Scopes
48
49 The default auth config requests `https://www.googleapis.com/auth/discoveryengine.readwrite`. It can authorize Discovery Engine writes within the user's IAM permissions. See the [notebook listing reference](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.notebooks/listRecentlyViewed) for the required scopes and IAM permissions.
50
51 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.
52
53 ### Publish and verify the app
54
55 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).
56
57 If you change the requested scopes later, reconnect the account so the user grants the new access.