Skip to main content

Availability

ComponentVersionEditions
Developer PortalAvailable since v1.12.0Enterprise

Prerequisites

  1. Dashboard License: Contact our team to obtain a license or get self-managed trial license by completing the registration on our website.
  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.
  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, Plans and Catalogue 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 in the Developer Portal for the user.
  2. Add a custom credential to that app.
  3. Select one or more API Product and the Plan to associate with that credential.
  4. Save, confirm visibility on the user’s developer portal dashboard, and verify API access.
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).

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. Add Custom Credential Button
    • 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.
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.Custom Credentials Dashboard

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. View My Apps
  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.
    View My Credentials

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):
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 to create the application for the user.
    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 to add the custom credential, specifying the token value, and associating the desired products and plan.
    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
        }'