Skip to content

Conversation

@sharadregoti
Copy link
Contributor

@sharadregoti sharadregoti commented Dec 2, 2025

PR Type

Documentation


Description

  • Add guide for importing custom credentials

  • Document associating products and plans

  • Include UI steps and API examples

  • Update docs navigation to include guide


Diagram Walkthrough

flowchart LR
  docs["docs.json navigation"] -- "add link" --> guide["import-custom-credentials guide"]
  guide -- "UI steps + verification" --> users["Portal admins & developers"]
  guide -- "API examples" --> automation["Automation via Portal APIs"]
Loading

File Walkthrough

Relevant files
Documentation
docs.json
Add new guide to navigation                                                           

docs.json

  • Add tyk-developer-portal/import-custom-credentials to Guides.
  • Ensure discoverability under Consuming APIs > Guides.
+2/-1     
import-custom-credentials.mdx
New guide: import custom credentials                                         

tyk-developer-portal/import-custom-credentials.mdx

  • New guide on importing Tyk managed custom credentials.
  • Step-by-step UI workflow with screenshots.
  • Verification steps and curl example.
  • API workflows for app and credential creation.
+138/-0 

@github-actions
Copy link

github-actions bot commented Dec 2, 2025

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Navigation Consistency

Ensure the new page slug tyk-developer-portal/import-custom-credentials matches the actual path and sidebar grouping, and that the added "graphql-playground" entry remains valid in this new ordering.

  "tyk-developer-portal/graphql-playground",
  "tyk-developer-portal/import-custom-credentials"
]
Broken/Placeholder Content

The Note block references a YouTube demo with a TODO and no link. Replace with a working URL or remove to avoid publishing placeholder text.

<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).

*TODO: Add the YouTube link to the video here.*
</Note>
API Example Accuracy

Verify endpoint paths, required fields, and casing in the API examples (e.g., /portal-api/apps, /custom_credentials, field names like PlanID, ProductIDs, KeyID) align with the actual Portal API; remove unused fields if not required.

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

    ```bash
    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](/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
    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
        }'
    ```

@github-actions
Copy link

github-actions bot commented Dec 2, 2025

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Correct and simplify API example

Remove unused or sensitive-looking fields from the example if not required for
Tyk-managed custom credentials, and provide concrete enum values to prevent
copy-paste errors. Also wrap the JSON with proper escaping or use --data-raw to
avoid shell quoting issues on some environments.

tyk-developer-portal/import-custom-credentials.mdx [118-138]

 ```bash
 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
-    }'
+  --url http://localhost:3001/portal-api/apps/{app_id}/custom_credentials \
+  --header 'Authorization: <api-key>' \
+  --header 'Content-Type: application/json' \
+  --data-raw '{
+    "Alias": "Custom API Token",
+    "Type": "CREDENTIAL_TYPE_TYK_MANAGED",
+    "PlanID": 123,
+    "AuthenticationMethod": "AUTH_TOKEN",
+    "ProductIDs": [123, 456],
+    "AuthTokenType": "AUTH_TOKEN_CUSTOM",
+    "KeyID": "YOUR_EXISTING_TOKEN_VALUE"
+  }'
<details><summary>Suggestion importance[1-10]: 7</summary>

__

Why: The proposal simplifies the example, uses concrete enums, and avoids shell quoting pitfalls; it's contextually aligned with the API section, though some field removals may depend on API requirements not fully shown.

</details></details></td><td align=center>Medium

</td></tr><tr><td>



<details><summary>Validate docs route slug</summary>

___


**Ensure the new docs path matches the actual filename and directory slug. If the MDX <br>file is named <code>import-custom-credentials.mdx</code>, include the <code>.mdx</code> route mapping or <br>confirm the site generator resolves it without the extension to prevent broken <br>links.**

[docs.json [512-516]](https://github.com/TykTechnologies/tyk-docs/pull/1075/files#diff-b7b4169fa5b2e02aa17d40553a73c5d9520086753c501eeb926c63b162bb6d9eR512-R516)

```diff
+{
+  "group": "Guides",
+  "pages": [
+    "tyk-developer-portal/graphql-playground",
+    "tyk-developer-portal/import-custom-credentials"
+  ]
+}
 
-
Suggestion importance[1-10]: 6

__

Why: The suggestion is reasonable to prevent broken links and matches the added pages under the "Guides" group, but it only asks to verify behavior and doesn't propose a concrete fix beyond confirmation.

Low
Remove TODO placeholder link

Replace the TODO with a working link or remove the section to avoid publishing
placeholder content. Leaving TODOs can mislead users and degrade documentation
quality.

tyk-developer-portal/import-custom-credentials.mdx [14-18]

 <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).
 
-*TODO: Add the YouTube link to the video here.*
+https://www.youtube.com/watch?v=REPLACE_WITH_VALID_ID
 </Note>
Suggestion importance[1-10]: 5

__

Why: Replacing a TODO with a real link or removing it improves doc quality; the snippet matches the new content, but it's a minor documentation cleanup without functional impact.

Low

JoanCamosTyk
JoanCamosTyk previously approved these changes Dec 2, 2025
sedkis
sedkis previously approved these changes Dec 3, 2025
caroltyk
caroltyk previously approved these changes Dec 3, 2025
@sharadregoti sharadregoti dismissed stale reviews from sedkis, caroltyk, and JoanCamosTyk via f48cefd December 4, 2025 05:45
@sharadregoti sharadregoti merged commit 1354ab4 into main Dec 4, 2025
7 checks passed
@buger
Copy link
Member

buger commented Dec 4, 2025

/release to release-5.10

@github-actions
Copy link

github-actions bot commented Dec 4, 2025

✅ Cherry-pick successful. A PR was created and auto-merged (if allowed): #1107

buger added a commit that referenced this pull request Dec 4, 2025
…Tyk Custom Credentials (#1075)

[TT-15515] Associate Products and Plan with Tyk Custom Credentials (#1075)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants