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

# Site24x7 Provider

> The Site24x7 Provider allows you to install webhooks and receive alerts in Site24x7. It manages authentication, setup of webhooks, and retrieval of alert logs from Site24x7.

## Authentication

This provider requires authentication.

* **zohoRefreshToken**: Zoho Refresh Token (required: True, sensitive: True)
* **zohoClientId**: Zoho Client Id (required: True, sensitive: True)
* **zohoClientSecret**: Zoho Client Secret (required: True, sensitive: True)
* **zohoAccountTLD**: Zoho Account's TLD (.com | .eu | .com.cn | .in | .au | .jp) (required: True, sensitive: False)

Certain scopes may be required to perform specific actions or queries via the provider. Below is a summary of relevant scopes and their use cases:

* **authenticated**: User is Authenticated (mandatory)
* **valid\_tld**: TLD is amongst the list \[.com | .eu | .com.cn | .in | .com.au | .jp] (mandatory)

## In workflows

This provider can't be used as a "step" or "action" in workflows. If you want to use it, please let us know by creating an issue in the [GitHub repository](https://github.com/keephq/keep/issues).

### Main Class Methods

* **`setup_webhook(tenant_id, keep_api_url, api_key, setup_alerts)`**
  * `tenant_id (str)`: Tenant identifier.
  * `keep_api_url (str)`: URL to send alert data.
  * `api_key (str)`: API key for authentication.
  * `setup_alerts (bool)`: Whether to setup alerting capabilities (default is True).

* **`_get_alerts()`**
  * Returns a list of `AlertDto` objects representing the alerts.

## Connecting with the Provider

To use the Site24x7 Provider, initialize it with the necessary authentication credentials and provider configuration. Ensure that your Zoho account credentials (Client ID, Client Secret, and Refresh Token) are correctly set up in the `Site24x7ProviderAuthConfig`.

## Steps to Obtain a Refresh Token

1. **Registration and Client Credentials:**
   * Navigate to [Zoho API Console](https://api-console.zoho.com/).
   * Sign in or sign up using the email associated with your Site24x7 account.
   * Register your application using the "Self Client" option to get your Client ID and Client Secret.

2. **Generating Grant Token:**
   * Go to the Zoho Developer Console and access your registered Self Client.
   * In the "Generate Code" tab, input the required scopes (`Site24x7.Admin.Read, Site24x7.Admin.Create, Site24x7.Operations.Read`), description, and time duration.
   * Click "Generate" and copy the provided code.

3. **Generating Access and Refresh Tokens:**

   * Use the grant token to make a POST request to `https://accounts.zoho.com/oauth/v2/token` to obtain the access and refresh tokens.

   ```bash theme={null}
   curl -X POST 'https://accounts.zoho.com/oauth/v2/token' \
        -d 'client_id=your_client_id' \
        -d 'client_secret=your_client_secret' \
        -d 'code=your_grant_token' \
        -d 'grant_type=authorization_code'

   ```

   OR

   ```python theme={null}
   import requests

   response = requests.post(
       'https://accounts.zoho.com/oauth/v2/token',
       data={
           'client_id': 'your_client_id',
           'client_secret': 'your_client_secret',
           'code': 'your_grant_token',
           'grant_type': 'authorization_code'
       }
   )
   refresh_token = response.json().get('refresh_token')
   ```

***

## Notes

* You must use your domain-specific Zoho Accounts URL to generate refresh tokens, otherwise you will receive an `invalid_client` error. See [Data center for Zoho Account](https://help.zoho.com/portal/en/kb/accounts/manage-your-zoho-account/articles/data-center-for-zoho-account).
* Ensure that the necessary scopes **Site24x7.Admin.Read, Site24x7.Admin.Create, Site24x7.Operations.Read** are included when generating the grant token, as they dictate the API functionalities accessible via the provider.
* Zoho API Console [Link](https://api-console.zoho.com)

## Webhook Integration Modifications

The webhook integration grants Keep access to the following scopes within Site24x7:

* `authenticated`
* `valid_tld`

The webhook can be accessed via the "Alarms" section in the Site24x7 console.

***

## Useful Links

* [Site24x7 API Documentation](https://www.site24x7.com/help/api/)
* [Zoho OAuth Documentation](https://www.zoho.com/accounts/protocol/oauth/web-apps.html)
* [Site 24x7 Authentication Guide](https://www.site24x7.com/help/api/#authentication)
* [Third Party and Webhook Integrations](https://www.site24x7.com/help/api/#third-party-integrations)
* [List of Zoho Account datacenters](https://help.zoho.com/portal/en/kb/accounts/manage-your-zoho-account/articles/data-center-for-zoho-account)
