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
TS SDK Metaculus sends auth in credentials.apiKey but core factory reads credentials.apiToken #882
The core exchange factory uses credentials.apiToken (not credentials.apiKey) to authenticate Metaculus requests. The TS SDK Metaculus class accepts only ExchangeOptions, which provides no apiToken field. When the TS SDK sends credentials, it puts the token in credentials.apiKey. The factory ignores credentials.apiKey for Metaculus and only reads credentials.apiToken, so the token is silently discarded and auth falls back to the environment variable only.
…sends credentials.apiKey = 'my-metaculus-token' to the server. The factory reads credentials.apiToken, finds it undefined, and falls back to process.env.METACULUS_API_TOKEN. If that env var is not set, the exchange initializes unauthenticated even though the user explicitly provided a token.
The fix requires adding an apiToken field to ExchangeOptions (or a MetaculusOptions subtype) and including it in getCredentials().
Closing as duplicate of #465. Same underlying finding: Metaculus credential field is named api_token/apiToken in Python and core but apiKey in the TS SDK, causing silent auth failure. The additional context from this issue (exact core factory code at exchange-factory.ts:100–104 and the getCredentials() implementation) has been copied as a comment on #465.
Activity
realfishsam commentedon Jun 6, 2026
Closing as duplicate of #465. Same underlying finding: Metaculus credential field is named
api_token/apiTokenin Python and core butapiKeyin the TS SDK, causing silent auth failure. The additional context from this issue (exact core factory code atexchange-factory.ts:100–104and thegetCredentials()implementation) has been copied as a comment on #465.Generated by Claude Code
Metaculususesapi_tokencredential param; TypeScript usesapiKey#465