You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
API key verification forwards client User-Agent, causing Python urllib requests to fail #10352
I have not already reached out to Clerk support via email or Discord (if you have, no need to open an issue here)
This issue is not a question, general help request, or anything other than a bug report directly related to Clerk. Please ask questions in our Discord community: https://clerk.com/discord.
Copy .env.example to .env and configure credentials from the same Clerk instance, including a valid API key.
Run npm run repro.
The script uses unpatched @clerk/backend@3.2.2 and calls authenticateRequest(request, { acceptsToken: 'api_key' }) twice with the same credentials. Only the incoming User-Agent changes.
Expected behavior:
Both requests authenticate successfully.
The full live output is included in the reproduction README.
Suspected cause: verifyAPIKey() passes the authentication context to createBackendApiClient(options). The context's incoming userAgent overrides the SDK's default User-Agent.
Using the SDK User-Agent for this outbound request resolved the issue in our application:
Activity