Hi Team,
I am experiencing a persistent 401 Unauthorized error while trying to synchronize a Provider in the Tyk Portal to fetch API Products from the Tyk Dashboard. Both the Portal and Dashboard are running in the same Docker environment.
1. Environment Details
-
Deployment: Self-hosted Docker Compose.
-
Tyk Version:
GATEWAY_VERSION=“v5.8.0”
PORTAL_VERSION=“v1.13.1”
DASHBOARD_VERSION=“v5.8.0” -
Connectivity: Using Docker service name (
http://tyk-dashboard:3000) for internal communication.
2. The Problem The Provider status remains “Down” and the sync process fails with the following error:
Failed to sync provider developer: TykPro.Sync. getting available products: fetching policies: API Returned error: 401 Unauthorized
3. Troubleshooting Performed
- Credential Verification: I have double-checked the Secret (Tyk Dashboard API Access Credentials) and Organisation ID from the User Profile page. As seen in the attached screenshots, the values entered in the Provider settings are an exact match (case-sensitive, no leading/trailing spaces).
- User Permissions: The user account is set to the Admin level.
- Network: Initial
no route to hostissues were resolved by switching to the internal Docker network, confirming that the Portal can physically reach the Dashboard.
4. Observations Despite having 100% matching credentials between the Dashboard UI and the Portal Provider configuration, the Dashboard continues to reject the authentication request.
5. Questions
- Is there any internal cache or configuration in
tyk_analytics.confthat might cause a valid API key to be rejected? - Are there specific license requirements for the
tyk-proprovider type to function correctly? - Should I be using the
admin_auth_keyfrom the config file instead of the User API Key for Portal synchronization?