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
| 1 | ## How do I set up custom OAuth credentials for Zoho Inventory? |
| 2 | |
| 3 | Use your own Zoho OAuth client when you want the consent screen to show your app name and to manage the client credentials yourself. You need access to an existing Zoho Inventory organization. |
| 4 | |
| 5 | ### Create the Zoho OAuth client |
| 6 | |
| 7 | 1. Sign in to the [Zoho API Console](https://api-console.zoho.com/) with the account you use for Zoho Inventory. Use the console for your account's data center, for example `https://api-console.zoho.in/` for India. |
| 8 | 2. Click **Add Client** (or **Get Started** for your first client) and choose **Server-based Applications** → **Create Now**. You can reuse an existing server-based client if it has the right redirect URI. |
| 9 | |
| 10 |  |
| 11 | |
| 12 | 3. Enter a **Client Name** and a **Homepage URL**. Use your own product name: Zoho rejects client names that contain `ZOHO`. |
| 13 | 4. In **Authorized Redirect URIs**, enter `https://backend.composio.dev/api/v1/auth-apps/add`. It must exactly match the auth config's `oauth_redirect_uri` field. |
| 14 | |
| 15 |  |
| 16 | |
| 17 | 5. Click **Create**, then open the **Client Secret** tab and copy the **Client ID** and **Client Secret**. |
| 18 | |
| 19 |  |
| 20 | |
| 21 | ### Create the auth config in Composio |
| 22 | |
| 23 | 1. In the [Composio dashboard](https://dashboard.composio.dev/~/project/auth-configs?utm_source=docs&utm_medium=content&utm_campaign=toolkits-zoho_inventory), go to **Auth Configs** → **Create** and select **Zoho Inventory**. |
| 24 | |
| 25 | 2. Choose **OAuth 2.0** and **Your Own Credentials**, then paste the Client ID and Client Secret. Leave **Redirect URI** as the value you registered in Zoho. |
| 26 | |
| 27 | 3. In **Scopes**, keep only what your workflow needs. To add a scope that isn't listed, type its exact name and click **Add scope**. Click **Create Auth Config**. |
| 28 | 4. Click **Connect Account** and enter your data center code in **Region** (see below). **Organization ID** is optional: enter it to pick a specific Inventory organization (find it under **Settings** → **Organization Profile**). If you leave it blank, Composio uses the first organization available to the account. |
| 29 | |
| 30 |  |
| 31 | |
| 32 | 5. Sign in to Zoho, review the app name, organization, and permissions, tick the consent checkbox if shown, and click **Accept**. Then open the auth config's **Accounts** tab and check that the account shows **Active**. The config showing **Enabled** doesn't mean an account is connected. |
| 33 | |
| 34 |  |
| 35 | |
| 36 |  |
| 37 | |
| 38 | See [custom auth configs](/docs/auth-configuration/custom-auth-configs) for the general flow. |
| 39 | |
| 40 | ### Scopes |
| 41 | |
| 42 | Zoho takes scopes from the authorization request, so you set them in the auth config, not in the API Console. The default auth config requests the `.ALL` scopes for contacts, items, composite items, transfer orders, sales orders, packages, shipment orders, invoices, customer payments, credit notes, purchase orders, purchase receives, and bills, plus `ZohoInventory.settings.READ`. For a read-only check of organization details, `ZohoInventory.settings.READ` is enough. Check each tool against the [Zoho Inventory API reference](https://www.zoho.com/inventory/api/v1/introduction/). |
| 43 | |
| 44 | If you add scopes later, reconnect the account. An existing connection doesn't pick up new permissions. |
| 45 | |
| 46 | ### Data center |
| 47 | |
| 48 | **Region** is the ending of your Zoho Inventory web address: `com` for `inventory.zoho.com`, `eu` for `inventory.zoho.eu`, `in` for `inventory.zoho.in`, `au` for `inventory.zoho.com.au`. Other options are `jp`, `ca`, `cn`, and `sa`. Enter the code only, not a full URL. The client's data center and the account's data center must be compatible. If your app connects accounts in more than one data center, enable [multi-DC support](https://www.zoho.com/developer/oauth/web-server-apps/overview.html) for those regions on the client in the API Console. |
| 49 | |
| 50 | ### Troubleshooting |
| 51 | |
| 52 | - **Redirect mismatch**: compare the full callback URL in Zoho and in Composio, including the path. |
| 53 | - **Invalid client or data center error**: check the API Console's data center, the account's data center, and **Region**. |
| 54 | - **Permission or organization error**: check that the user can access the Zoho Inventory organization and that the auth config requests the scope the tool needs. |