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

# How to Associate API Products with Tyk Managed Custom Credentials

> This guide explains how an admin of the Tyk Developer Portal can associate API Products with Tyk Managed Custom Credentials. It covers the manual UI steps, how to verify on the developer portal, and guidance for bulk imports via the Developer Portal APIs.

## Availability

| Component        | Version                                                                                         | Editions   |
| :--------------- | :---------------------------------------------------------------------------------------------- | :--------- |
| Developer Portal | Available since [v1.12.0](/nightly/developer-support/release-notes/portal#1-12-0-release-notes) | Enterprise |

## Prerequisites

1. **Dashboard License**: [Contact our team](https://tyk.io/contact/) to obtain a license or get self-managed trial license by completing the registration on our [website](https://tyk.io/self-managed-trial/).
2. **Working Tyk Environment:** You need access to a running Tyk instance. For setup instructions using Docker, please refer to the [Tyk Getting Started Guide](/nightly/getting-started/quick-start).
3. Developer Portal Setup with
   1. Admin access to the Tyk Developer Portal.
   2. The end user (developer accounts) must exist in the portal.
   3. Tyk Developer Portal v1.12.0 or later
   4. [API Products](/nightly/portal/api-products), [Plans](/nightly/portal/api-plans) and [Catalogue](/nightly/tyk-stack/tyk-developer-portal/enterprise-developer-portal/managing-access/manage-catalogues) already created and published in the portal.
4. The custom token or credential value you want to import.

## What we will do

1. Create an [application](/nightly/portal/developer-app) in the Developer Portal for the user.
2. Add a custom credential to that app.
3. Select one or more [API Product](/nightly/portal/api-products) and the [Plan](/nightly/portal/api-plans) to associate with that credential.
4. Save, confirm visibility on the user’s developer portal dashboard, and verify API access.

<Note>
  **Watch the video demo on YouTube** — a short walkthrough that shows the entire flow (creating an app, importing a custom token, attaching products & plans, and verifying access).

  <iframe className="w-full aspect-video rounded-xl" src="https://www.youtube.com/embed/ml983AfLP5k" title="How to Import Custom API Tokens into the Tyk Developer Portal (Step-by-Step)" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen />
</Note>

## Instructions

Follow these steps to associate products and plans with custom credentials in the Tyk Developer Portal:

### 1. Create Application and Import Custom Credential

1. Log in to the Developer Portal as an **Administrator**.
2. In the left-hand navigation, go to **Apps**
3. Click **Add New App**
   * Enter a **Name** for the application (e.g., `Demo App`).
   * Select the **App Owner** that this application belongs to (the developer/customer account).
4. Next, click on the **Add Credential** button.

   <img src="https://mintcdn.com/tyk/ezRfNDPd9NTuKEOw/img/developer-portal/add-custom-credential.png?fit=max&auto=format&n=ezRfNDPd9NTuKEOw&q=85&s=985aa439dab7d2dd9f3efa591520207e" alt="Add Custom Credential Button" width="3023" height="1733" data-path="img/developer-portal/add-custom-credential.png" />

   * **Credential alias**: descriptive name for the credential (e.g., `Custom API Token`).
   * **Type of Credential**: choose **Tyk Managed** (so the portal can manage the credential metadata).
   * **Authentication method**: select **Auth Token**.
   * **Tyk authentication token type**: choose **Custom** (so you can paste your existing token value).
   * **Key ID**: paste the actual token value you are importing.
5. Next, in the **Access rights** section:
   * In the same dialog, choose the **Plan** you want to attach to this credential.
   * Select the API **Products** (one or more) that this credential should provide access to.
6. Click **Save** to create the application.

<Note>
  When you add a Tyk Managed Custom Credential, the Developer Portal automatically creates a corresponding API key in the Tyk Dashboard for that credential. You can find this key in the Dashboard, which allows you to manage and monitor its usage alongside other credentials.

  <img src="https://mintcdn.com/tyk/ezRfNDPd9NTuKEOw/img/developer-portal/custom-credentials-dashboard.png?fit=max&auto=format&n=ezRfNDPd9NTuKEOw&q=85&s=dfb85169c3653956de30689be5bbdba3" alt="Custom Credentials Dashboard" width="3023" height="1733" data-path="img/developer-portal/custom-credentials-dashboard.png" />
</Note>

### 2. Verify in Live Portal

1. Log in to the **developer portal** as the end user.

2. Go to **My Apps**, by clicking on your profile icon in the top-right corner and select **My Dashboard** from the dropdown.

   <img src="https://mintcdn.com/tyk/ezRfNDPd9NTuKEOw/img/developer-portal/view-apps.png?fit=max&auto=format&n=ezRfNDPd9NTuKEOw&q=85&s=1f6cf0e99a7247942519cd0487dc4729" alt="View My Apps" width="3023" height="1732" data-path="img/developer-portal/view-apps.png" />

3. Open the created **Application** (Demo App), now the user can view:

   1. The imported custom token.
   2. **Products** associated with the credential and click into them to view OpenAPI specs, Graph explorer, or other product details.
   3. The Plan details (rate limits, quotas) should be visible as part of the application/product view so the user understands limits that apply to their token.

   <img src="https://mintcdn.com/tyk/ezRfNDPd9NTuKEOw/img/developer-portal/view-credentials.png?fit=max&auto=format&n=ezRfNDPd9NTuKEOw&q=85&s=55f479b87342f0c73def9ae0714b5e56" alt="View My Credentials" width="3023" height="1729" data-path="img/developer-portal/view-credentials.png" />

### 3. Verify API access

The exact header and method depend on how your gateway expects the token (Authorization header, X-API-Key, etc.).

Example (replace `CUSTOM_KEY` and `https://api.example.com/endpoint` with your values):

```bash theme={null}
curl -v -H "Authorization: Bearer CUSTOM_KEY" https://api.example.com/endpoint
```

If everything is set up correctly, you should receive a successful response from the API, confirming that the custom credential is working and has access to the associated products.

## Import Custom Credentials via API

If you have a large number of users and tokens to import, you can replicate the workflow above programmatically using the Tyk Developer Portal APIs.

1. Use the [Create Application API](https://tyk.io/docs/api-reference/applications-and-credentials/create-a-new-developer-application) to create the application for the user.

   ```bash theme={null}
   curl --request POST \
       --url http://localhost:3001/portal-api/apps \
       --header 'Authorization: <api-key>' \
       --header 'Content-Type: application/json' \
       --data '{
           "Name": "Payment App",
           "Description": "This is my payment application",
           "RedirectURLs": "https://app-host/auth",
           "UserID": 1,
           "Visibility": "personal"
       }'
   ```

2. Use the [Add Credential to Application API](https://tyk.io/docs/api-reference/applications-and-credentials/create-a-custom-credential) to add the custom credential, specifying the token value, and associating the desired products and plan.

   ```bash theme={null}
   curl --request POST \
       --url http://localhost:3001/portal-api/apps/{app_id}/custom_credentials \
       --header 'Authorization: <api-key>' \
       --header 'Content-Type: application/json' \
       --data '{
           "Alias": "<string>",
           "Type": "CREDENTIAL_TYPE_TYK_MANAGED",
           "PlanID": 123,
           "AuthenticationMethod": "<string>",
           "ProductIDs": [
               123
           ],
           "AuthTokenType": "AUTH_TOKEN_CUSTOM",
           "KeyID": "<string>",
           "CredentialKey": "<string>",
           "CredentialSecret": "<string>",
           "ProviderID": 123,
           "ClientTypeID": 123
       }'
   ```
