# Udemy

![Udemy-logo.svg](https://assets.relyanceuat.xyz/images/docs/7760239705741/7760070339085.svg)
Udemy is an online learning platform for students and professionals that sells video courses on an array of topics.

In order to integrate Udemy with Relyance AI you will need a **Client ID** and **Client Secret**.

#### In Udemy:

1. Login to your Udemy account.
2. Go to: [https://www.udemy.com/instructor/account/api/](https://www.udemy.com/instructor/account/api/)
3. Click the **Request Affiliate API Client** button.
4. You’ll need to enter a valid Website for them to approve the request, which may take a day or two.
5. Once they approve the request, a client ID and secret will be available. Copy the **Client ID** and **Client Secret** to be used in Relyance AI

![Udemy-4.png](https://assets.relyanceuat.xyz/images/docs/7760239705741/7760463343373.png)

![Udemy-3.png](https://assets.relyanceuat.xyz/images/docs/7760239705741/7760463343117.png)

#### In the Relyance AI application:

1. Login to your Relyance account.
2. Navigate to the **Settings** Menu in the bottom left-hand side.
3. Select **Integrations**.
4. Click on the **Vendor Integration** tab.
5. Find the **Udemy** integration card and click it to open its connections.
6. Under **Authentication Method**, choose **Custom**.
8. Paste the **Client ID** and **Client Secret** into their respective fields.

![Udemy-1.png](https://assets.relyanceuat.xyz/images/docs/7760239705741/7760252523405.png)

9. Click **Authenticate**.
10. At this point, you should see the following result on the **Vendor** Integrations page:

![Udemy-2.png](https://assets.relyanceuat.xyz/images/docs/7760239705741/7760236747021.png)

11. Congratulations, you are now connected to **Udemy**.

<!-- terraform-examples:begin (generated from the integration catalog; do not hand-edit) -->

## Manage this integration with Terraform

Connections for this integration can be managed as code with the [Relyance Terraform provider](https://registry.terraform.io/providers/Relyance/relyance/latest). Non-secret fields go in `auth.params`; secret fields go in `auth.secrets_wo`, which is write-only — never stored in Terraform state. Rotate secrets by bumping `auth.secrets_wo_version`.

```hcl
resource "relyance_integration_connection" "udemy" {
  vendor = "udemy"
  name   = "<your connection name>"

  auth = {
    method = "client-credentials"
    params = {
      client_id = "<client_id>"
      data_storage_location = "us"
    }
    # Secret fields are write-only: sent to Relyance, never stored in state.
    secrets_wo = {
      client_secret = var.udemy_client_secret
    }
    secrets_wo_version = 1
  }

  scans = { "property-inspection" = { enabled = true } }
}
```

<!-- terraform-examples:end -->
