> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zentien.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Your Org

> Authenticate your Salesforce org with Zentien using OAuth.

## How it works

Zentien connects to your org using **OAuth 2.0** — the same secure standard used by Salesforce integrations like Slack and DocuSign. You authorise once and Zentien stores an encrypted access token to subscribe to your Platform Events in real time.

Your credentials are never stored in plaintext. Access tokens are AES-256 encrypted in Zentien's database.

## Steps

1. Log in to [app.zentien.io](https://app.zentien.io)
2. Go to **Orgs** in the left navigation
3. Click **Connect Org**
4. Select your environment — **Production** or **Sandbox**
5. You will be redirected to Salesforce login
6. Log in with a user that has API access (typically a System Administrator)
7. Click **Allow** to grant Zentien access
8. You are redirected back to Zentien — your org appears in the Orgs list

## What Zentien accesses

Zentien requests the following OAuth scopes:

* **`api`** — to subscribe to Platform Events via the Streaming API
* **`refresh_token`** — to maintain the connection without requiring you to re-authenticate

Zentien does **not** read or write any of your Salesforce records, contacts, opportunities, or business data.

## Reconnecting

If your org's access token expires or is revoked, go to **Orgs** and click **Reconnect** next to the org. This re-runs the OAuth flow and refreshes the token.

## Next step

<Card title="Configure unhandled error capture" icon="envelope" href="/setup/unhandled-errors">
  Set up email inbound to capture Flow faults and unhandled Apex exceptions automatically.
</Card>
