@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, 04:45 UTC

next
md 90 lines 7.76 KB
Rendered Raw
1 ## How do I set up custom Google OAuth credentials for Google Maps?
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 Use a Google Cloud project with Maps billing enabled, and confirm your team is allowed to use that project's Maps quota.
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 **Places API (New)** (`places.googleapis.com`), and select **Enable**. If the page shows **Manage**, the API is already enabled. Composio uses it to check the connection.
14 3. If your workflow computes routes, also enable **Routes API** (`routes.googleapis.com`). Check Google's [authentication requirements](https://developers.google.com/maps/documentation/places/web-service/get-api-key) for each Maps endpoint you use.
15 4. 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/Q8INvnJoiCMyajqrrAtq6ovCE5U.webp)
18
19 5. 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/BetTxXqa2c1dgg4QeV4g9RV008.webp)
22
23 6. 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 7. Open **Clients** → **Create client**, choose **Web application**, and give it a name.
25
26 ![Create OAuth client ID form with Web application selected](/images/toolkits/shared/S7mFFv6C5mCP4y0ScTzRzQd8Nc.webp)
27
28 8. 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.
29
30 ![OAuth client form with the Composio redirect URI under Authorized redirect URIs](/images/toolkits/shared/1qh7A0aEGRUU1K19aU37FrcxTY.webp)
31
32 9. Select **Create**. Copy the **Client ID** and **Client secret**. Google shows the full secret only once, so save it before you close the dialog.
33
34 ![Google OAuth web client details with Client ID and Client secret](/images/toolkits/shared/TmVTLOgVKQDqamjQVxKDBXJtPQ.webp)
35
36 ### Create the auth config in Composio
37
38 1. In the [Composio dashboard](https://dashboard.composio.dev/~/project/auth-configs?utm_source=docs&utm_medium=content&utm_campaign=toolkits-google_maps), open **Auth Configs** → **Create** and select **Google Maps**.
39 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**.
40 3. Open the auth config, select **Connect Account**, and sign in. The connection check looks up a place through Places API (New), which can count toward Maps usage. Google requires a billing-enabled quota project for OAuth requests, so if Google rejects the connection, check API enablement, quota-project permissions, and billing.
41
42 ![Google consent screen asking to manage your Google Cloud data and see your email address](/images/toolkits/google_maps/google-consent-screen.webp)
43
44 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.
45
46 For the general flow, see [Custom auth configs](/docs/auth-configuration/custom-auth-configs).
47
48 ### Scopes
49
50 The default auth config requests `https://www.googleapis.com/auth/cloud-platform`. Google requires it for OAuth requests to Places API (New) and Routes API. It can grant broad access to any Google Cloud resources the signed-in user can reach, so review that user's project permissions before you connect.
51
52 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.
53
54 ### Use an API key instead
55
56 Google Maps also supports an API key connection. Create a key in Google Cloud Console under **APIs & Services** → **Credentials** in a project with the Maps APIs and billing enabled, then paste it (it starts with `AIza`) when you connect the account. Some tools, such as the Maps Embed API, work only with an API key (see below).
57
58 ### Publish and verify the app
59
60 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).
61
62 If you change the requested scopes later, reconnect the account so the user grants the new access.
63
64 ## Why am I seeing "App is blocked" when connecting Google Maps?
65
66 The OAuth client is requesting scopes that Google hasn't verified for that client. This usually happens when you add extra scopes beyond the defaults.
67
68 Remove the additional scopes from your auth config, or use your own OAuth app and submit those scopes for Google verification. The setup and verification steps are under **How do I set up custom Google OAuth credentials for Google Maps?** above.
69
70 ## Why am I getting "Google Maps API has not been used in project" error?
71
72 When using custom OAuth credentials, the Google Maps API must be enabled in the Google Cloud project that owns those credentials. Enable it in Google Cloud Console under APIs & Services, wait a few minutes, and retry.
73
74 ## Why am I getting "Error 400: invalid_scope"?
75
76 The requested scopes are invalid or incorrectly formatted in the authorization URL. Verify your scope values against the [Google OAuth scopes docs](https://developers.google.com/identity/protocols/oauth2). If you're creating auth configs programmatically, see the [programmatic auth config guide](/docs/authentication/programmatic-auth-configs).
77
78 ## Why does the OAuth consent screen show "Composio" instead of my app?
79
80 By default, the consent screen uses Composio's OAuth app. To show your own app name and logo, create your own OAuth app and set a custom redirect URL. See [White-labeling authentication](/docs/authentication/white-labeling-authentication#using-your-own-oauth-apps).
81
82 ## Why am I getting 401 errors on tool calls?
83
84 The user's access token is no longer valid. Common causes: the user revoked access, changed their password or 2FA, a Workspace admin policy changed, or Google's refresh token limit (~50 per account) was exceeded. Re-authenticating the user typically resolves this.
85
86 ## What is required for the Maps Embed API?
87
88 `GOOGLE_MAPS_MAPS_EMBED_API` is API-key based. Google's Maps Embed API requires an API key on each request; OAuth2 is not the auth path for this tool.
89
90 You must use an API-key connection to use this tool.