Skip to main content

Authorization

Follow this guide to create a new Castor EDC credential that will allow Nexla to authenticate to and exchange data with your Castor EDC account.
castor_edc_api_auth.png

Castor EDC

Prerequisites

The Castor EDC API uses the industry-standard OAuth 2.0 client credentials grant for server-to-server authentication. Nexla connects to Castor on your behalf using a Client ID and Client Secret that are tied to your Castor user account. These credentials grant the same access to your studies and data as your Castor username and password, so they should be treated as sensitive secrets and stored securely.

Before creating a Castor EDC credential in Nexla, complete the steps below to obtain your API credentials and confirm the correct API base URL for your account.

Locate Your Client ID and Client Secret

Your API client credentials are available in your Castor account settings. Each Castor user has a unique Client ID and Client Secret.

  1. Sign in to your Castor account at the regional URL for your organization (for example, https://data.castoredc.com).

  2. In the top blue navigation bar, hover over Account, and then click Settings.

  3. Open the Castor EDC API subtab to view your user credentials.

  4. Copy the Client ID and Client Secret values for use in Nexla.

    If a Client Secret has not yet been generated, or if you need to replace an existing one, use the option in the Castor EDC API subtab to generate a new secret. When you regenerate a Client Secret, any previously issued secrets become invalid immediately, so be sure to update Nexla with the most recent value. Storing your secret in a password manager is recommended.

Keep your credentials confidential

The Client ID and Client Secret provide the same access to your data as your own username and password. Do not share them with third parties unless you intend to grant those parties access to your studies and data through your account.

Determine Your API Base URL and Access Token URL

Castor operates separate regional environments, and your credentials are valid only on the environment where your studies are hosted. The Base URL identifies the regional API endpoint, and the Access Token URL is where Nexla exchanges your Client ID and Client Secret for an access token.

  • Base URL – Select the value that matches your Castor environment:

    • EU Production: https://data.castoredc.com/api
    • UK Production: https://uk.castoredc.com/api
    • US Production: https://us.castoredc.com/api
    • AU Production: https://au.castoredc.com/api
    • Sandbox: https://sandbox.castoredc.com/api
  • Access Token URL – The OAuth 2.0 token endpoint for your environment, formed by appending /oauth/token to your environment host (for example, https://data.castoredc.com/api/oauth/token for EU Production).

Complete API reference documentation for each regional environment is available at the corresponding base URL (for example, https://data.castoredc.com/api). Confirm that the region you select here matches the region where you log in to Castor.

Create a Castor EDC Credential

  • To create a new Castor EDC credential, after selecting the data source/destination type, click the Add Credential tile to open the Add New Credential overlay.

Credential Name & Description

  1. Enter a name for the credential in the Credential Name field and a short, meaningful description in the Credential Description field.

    Resource descriptions are recommended but are not required. They should be used to provide information about the resource purpose, data freshness, etc. that can help the owner and other users efficiently understand and utilize the resource.

Authentication Settings

Castor EDC uses the OAuth 2.0 client credentials flow. Provide the Client ID, Client Secret, Access Token URL, and Base URL that you gathered in the Prerequisites section. Nexla uses these values to request a Bearer access token and to direct all subsequent API calls to the correct regional environment.

  1. Enter the Client ID for your Castor user in the Client ID field. This is the unique public identifier assigned to your account in the Castor EDC API settings subtab.

  2. Enter the Client Secret that accompanies your Client ID in the Client Secret field. This value is treated as a password and is stored securely. If you regenerate the secret in Castor at any time, update this field with the new value.

  3. Enter the Access Token URL for your environment in the Access Token URL field (for example, https://data.castoredc.com/api/oauth/token for EU Production). Nexla sends a POST request to this URL to obtain an access token using the client credentials grant.

  4. Select or enter the Base URL for your Castor environment in the Base URL field. This must match the region where your studies are hosted. The default value is https://data.castoredc.com/api (EU Production).

Save the Credential

  1. Once all of the relevant steps in the above sections have been completed, click the Save button at the bottom of the overlay to save the configured credential.

  2. The newly added credential will now appear in a tile on the Authenticate screen during data source/destination creation and can be selected for use with a new data source or destination.