# Connect Zendesk

> Import support conversations so an audience speaks in your customers' own unprompted words. An admin creates a read-only OAuth client once, inside your own Zendesk.

Source: https://imario.ai/docs/audiences/connections/connect-zendesk

Support tickets are the one place customers say what they think without being asked. Importing them lets an audience use those words.

A Zendesk OAuth client is scoped to a single Zendesk instance, so there is no shared iMario app to authorize: an admin in your own Zendesk creates one, and iMario uses it to read only what you pick. It takes a couple of minutes and costs nothing.

## What your admin does, once

1. In Zendesk, open **Admin Center** → **Apps and integrations** → **APIs** → **OAuth clients**.
2. Click **Add OAuth client** and give it a name your colleagues will recognise, such as "iMario".
3. For **Redirect URLs**, paste this exactly:

   ```
   https://api.imario.ai/api/connections/callback
   ```

4. Leave **Allowed scopes** empty, or if you restrict it, include these two:

   | Scope | What it lets iMario read |
   | --- | --- |
   | `tickets:read` | Tickets and their comments, which are the words the audience will use |
   | `users:read` | Who wrote each comment, so a conversation can reach the customer it was with |

5. Save. Zendesk shows the **Secret once**, so copy it now, along with the **Unique identifier**.

Both scopes are read-only. Nothing in this client can change or delete anything in Zendesk. Note that iMario does not ask for the blanket `read` scope, which would grant every GET endpoint in your account.

## Find your subdomain

iMario also asks for your Zendesk subdomain, because every Zendesk instance has its own host. It is the first part of your Zendesk web address: in `acme.zendesk.com` the subdomain is `acme`.

## Connect in iMario

1. In **Create audience**, click **Connect a data system** and choose **Zendesk**.
2. Paste the **Unique identifier** and **Secret** from step 5, and your **subdomain**.
3. Click **Connect to Zendesk** and approve on Zendesk's own page.
4. Your tickets are listed with their subject and date. Search the list if it is long, then tick the ones to use.
5. Click **Import**.

## What iMario reads

Only the tickets you tick, and for each one its comments and the address of the person who wrote them. That address is a join key, never an answer: it is what lets a customer's complaint reach the same customer in your audience. A ticket whose requester has no address on file still contributes to how the audience speaks, without being attached to an individual.

Agent replies are read so the conversation makes sense, but they are never treated as a customer's words.

## Troubleshooting

**The Zendesk page says the redirect URL does not match.** It is compared character for character. Check for a trailing slash, and that the client's Redirect URLs field contains the address above.

**"Invalid scope" when connecting.** The client's **Allowed scopes** were restricted without including `tickets:read` and `users:read`. Either add them, or clear the field so the client may request any scope.

**Every conversation imports without a customer address.** The requester lookup needs `users:read`. If the client was created before that scope was added, connect again: a token carries the scopes that existed when you authorized.

## Next steps

- [Connect a data system](https://imario.ai/docs/audiences/connections/connect-data-system): How every connected system is imported and disconnected.
- [Build an Audience from Your Data](https://imario.ai/docs/audiences/build-from-data): Turn the imported material into a reusable audience.
