|
| 1 | +--- |
| 2 | +title: Zoho Desk Self Clients |
| 3 | +description: Set up a Zoho Self Client so your workflows can call Zoho Desk without a personal OAuth login |
| 4 | +--- |
| 5 | + |
| 6 | +import { Callout } from 'fumadocs-ui/components/callout' |
| 7 | +import { Step, Steps } from 'fumadocs-ui/components/steps' |
| 8 | +import { FAQ } from '@/components/ui/faq' |
| 9 | + |
| 10 | +A Zoho **Self Client** is an OAuth client that has no redirect URL and no end user. Instead of sending someone through a consent screen, your workflows authenticate to Zoho Desk with the client's own ID and secret, and Sim mints a short-lived access token on demand — no user consent to expire, and no personal login that breaks when someone leaves the team. |
| 11 | + |
| 12 | +This is the recommended way to use Zoho Desk in production workflows: the credential belongs to your organization rather than a person, the granted scopes are explicit, and tokens are minted fresh whenever a workflow runs. |
| 13 | + |
| 14 | +## Prerequisites |
| 15 | + |
| 16 | +You need a Zoho account with access to the [Zoho API Console](https://api-console.zoho.com) for the same organization your Zoho Desk portal belongs to, and the Zoho Desk **organization ID** for that portal. |
| 17 | + |
| 18 | +<Callout type="warn"> |
| 19 | +Sim's Zoho Desk integration authenticates against the US accounts server (`accounts.zoho.com`). Organizations hosted in another Zoho data center (EU, IN, AU, JP, CA, SA, CN, UK) cannot mint tokens through this flow. Once a token is minted, API calls are routed to the Desk host for the data center Zoho reports, so data residency is honored for the calls themselves. |
| 20 | +</Callout> |
| 21 | + |
| 22 | +<Callout type="warn"> |
| 23 | +Zoho Desk **webhooks are a Professional-edition and above feature**. The Zoho Desk trigger in Sim provisions a webhook subscription, so it does not work on Free or Standard plans. The trigger also requires a personal **OAuth** connection rather than a Self Client — see [Triggers](#triggers-still-need-oauth) below. |
| 24 | +</Callout> |
| 25 | + |
| 26 | +## Setting Up the Self Client |
| 27 | + |
| 28 | +### 1. Create the Self Client |
| 29 | + |
| 30 | +<Steps> |
| 31 | + <Step> |
| 32 | + Sign in at [api-console.zoho.com](https://api-console.zoho.com) with the Zoho account that owns the Desk portal |
| 33 | + </Step> |
| 34 | + <Step> |
| 35 | + Click **Add Client**, choose **Self Client**, and click **Create** — then **OK** on the confirmation |
| 36 | + |
| 37 | + {/* TODO(screenshot): Zoho API Console Add Client dialog with Self Client selected */} |
| 38 | + </Step> |
| 39 | + <Step> |
| 40 | + Open the new client and switch to the **Client Secret** tab. Copy the **Client ID** and **Client Secret** — these are two of the three values you'll paste into Sim |
| 41 | + |
| 42 | + {/* TODO(screenshot): Self Client Client Secret tab showing Client ID and Client Secret */} |
| 43 | + </Step> |
| 44 | +</Steps> |
| 45 | + |
| 46 | +<Callout type="info"> |
| 47 | +You do **not** need the **Generate Code** tab. That tab produces a one-time authorization code for the code-exchange flow; the client-credentials flow Sim uses needs only the client ID, the client secret, and your organization ID. |
| 48 | +</Callout> |
| 49 | + |
| 50 | +### 2. Find Your Organization ID |
| 51 | + |
| 52 | +<Steps> |
| 53 | + <Step> |
| 54 | + Open Zoho Desk and go to **Setup** (the gear icon) → **Developer Space** → **API** |
| 55 | + </Step> |
| 56 | + <Step> |
| 57 | + Copy the numeric **Organization ID** (also called the Org ID or portal ID) shown there — for example `600123456` |
| 58 | + |
| 59 | + {/* TODO(screenshot): Zoho Desk Setup > Developer Space > API showing the Organization ID */} |
| 60 | + </Step> |
| 61 | +</Steps> |
| 62 | + |
| 63 | +<Callout type="warn"> |
| 64 | +This must be the organization ID of the Desk portal you want the workflows to act on. If your Zoho account has more than one Desk portal, using the wrong ID makes Zoho either reject the token request or issue a token scoped to the wrong portal. |
| 65 | +</Callout> |
| 66 | + |
| 67 | +### 3. Scopes |
| 68 | + |
| 69 | +Sim requests exactly the scopes its Zoho Desk tools and trigger exercise: |
| 70 | + |
| 71 | +``` |
| 72 | +Desk.tickets.READ |
| 73 | +Desk.tickets.UPDATE |
| 74 | +Desk.contacts.READ |
| 75 | +Desk.basic.READ |
| 76 | +Desk.webhooks.CREATE |
| 77 | +Desk.webhooks.DELETE |
| 78 | +aaaserver.profile.READ |
| 79 | +``` |
| 80 | + |
| 81 | +Sim sends this list on every token request, so there is nothing to pre-configure on the Self Client itself. If Zoho rejects the request with an invalid-scope error, the Self Client's owner does not have access to one of the Desk modules above in that organization. |
| 82 | + |
| 83 | +A scope that is granted but insufficient surfaces at run time as a `4xx` from the Zoho Desk API naming the scope problem. |
| 84 | + |
| 85 | +### 4. Protect the Client Secret |
| 86 | + |
| 87 | +The client secret is bearer material for your Zoho Desk organization, limited only by the scopes above. Treat it like a password — do not commit it to source control or share it publicly. Sim encrypts it at rest. |
| 88 | + |
| 89 | +<Callout type="info"> |
| 90 | +Regenerating or revoking the Self Client in the Zoho API Console invalidates the stored pair immediately. If you rotate it, update the credential in Sim right away. |
| 91 | +</Callout> |
| 92 | + |
| 93 | +## Adding the Self Client to Sim |
| 94 | + |
| 95 | +<Steps> |
| 96 | + <Step> |
| 97 | + Open **Integrations** from your workspace sidebar |
| 98 | + </Step> |
| 99 | + <Step> |
| 100 | + Search for "Zoho Desk" and open it, then click **Add to Sim** and choose **Add Self Client** |
| 101 | + |
| 102 | + {/* TODO(screenshot): Zoho Desk integration page with the Add Self Client connect option */} |
| 103 | + </Step> |
| 104 | + <Step> |
| 105 | + In the **Add Zoho Desk Self Client** dialog, paste the **Client ID**, the **Client secret**, and the numeric **Organization ID**, and optionally set a display name and description |
| 106 | + |
| 107 | + {/* TODO(screenshot): Add Zoho Desk Self Client dialog with all three fields filled in */} |
| 108 | + </Step> |
| 109 | + <Step> |
| 110 | + Click **Add Self Client**. Sim verifies the credentials by minting a real access token from Zoho — if it fails, the error tells you whether Zoho rejected the credentials or couldn't be reached. |
| 111 | + </Step> |
| 112 | +</Steps> |
| 113 | + |
| 114 | +## Using the Self Client in Workflows |
| 115 | + |
| 116 | +Add a Zoho Desk block to your workflow. In the credential dropdown, your Self Client appears alongside any OAuth credentials. Select it and configure the block as you normally would. |
| 117 | + |
| 118 | +{/* TODO(screenshot): Zoho Desk block in a workflow with the Self Client selected as the credential */} |
| 119 | + |
| 120 | +The block calls the Zoho Desk REST API with a freshly minted access token — the same requests as the OAuth flow, so every Zoho Desk tool works, subject to the scopes above. |
| 121 | + |
| 122 | +### Triggers still need OAuth |
| 123 | + |
| 124 | +The Zoho Desk **trigger** provisions and tears down its own webhook subscription against your Desk organization, and that provisioning path currently runs only against a personal OAuth connection. Connect a Zoho Desk account through OAuth for triggers, and use the Self Client for the blocks that read and update tickets. |
| 125 | + |
| 126 | +## Token Behavior |
| 127 | + |
| 128 | +Access tokens minted from a Self Client live for one hour and there is **no refresh token** — Sim mints a new token whenever one is needed, and caches the current one until it is close to expiry. Two events invalidate the stored credential: |
| 129 | + |
| 130 | +- **Revoking or deleting the Self Client** in the Zoho API Console — no new tokens can be minted |
| 131 | +- **Regenerating the client secret** — the stored pair stops working; paste the new secret into the credential in Sim |
| 132 | + |
| 133 | +<FAQ items={[ |
| 134 | + { question: "Why a Self Client instead of OAuth?", answer: "A Self Client authenticates as your Zoho organization, not as a person — nothing expires when someone leaves or their login lapses. Sim mints short-lived tokens from the stored client ID and secret whenever a workflow runs." }, |
| 135 | + { question: "Where do I find the Organization ID?", answer: "In Zoho Desk, go to Setup (gear icon) → Developer Space → API. The numeric Organization ID shown there is the value to paste. It is the same ID that Zoho Desk API calls send in the orgId header." }, |
| 136 | + { question: "Zoho rejects my credentials with invalid_client — why?", answer: "Either the client ID or secret was mistyped, or the client you created is not a Self Client. Only Self Clients support the client-credentials grant — in the Zoho API Console, Add Client → Self Client. Copy both values from the client's Client Secret tab." }, |
| 137 | + { question: "Zoho returns missing_org_info or rejects the organization — why?", answer: "Zoho could not resolve a Desk organization from the ID you pasted. Re-copy the numeric Organization ID from Setup → Developer Space → API in the Desk portal you want to use. If your Zoho account has multiple Desk portals, make sure it is the ID of the right one." }, |
| 138 | + { question: "Can I use a Self Client with a non-US Zoho account?", answer: "Not currently. Sim's Zoho Desk integration authenticates against the US accounts server, accounts.zoho.com. An organization in another Zoho data center must authenticate against its own accounts server, which this flow does not support." }, |
| 139 | + { question: "Why doesn't my Zoho Desk trigger work with the Self Client?", answer: "The trigger provisions a webhook subscription in your Desk organization, and that path runs against a personal OAuth connection only. Connect Zoho Desk through OAuth for triggers. Separately, Zoho Desk webhooks require a Professional-edition plan or above — they are unavailable on Free and Standard." }, |
| 140 | + { question: "How do I rotate the credentials?", answer: "Regenerate the client secret on the Self Client's Client Secret tab in the Zoho API Console, then update the credential in Sim with the new secret. The old secret stops working as soon as it's regenerated, so update Sim promptly." }, |
| 141 | +]} /> |
0 commit comments