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
I am trying to use api to make request to Alpaca. The Readme.io demo page shows me that I can add Authorization Headers for the API Key & API Secret. When I follow the example, my code crashes with the following message:
Error: Sorry, this operation currently requires multiple forms of authentication which this library doesn't yet support.
So yeah api does support authorization headers, but it doesn't support API endpoints that have multiple forms of auth because sdk.auth() has no way of knowing which security scheme, and authorization header, to apply that value to.
We've had some ideas on how to improve this, like adding a second argument to sdk.auth('API-KEY', 'x-api-key') to let you specify the header to attach it to but that conflicts with sdk.auth's handling of basic auth.
Getting this integrated would be a big enabler. Is there any workaround for me as a developer to set headers on the SDK? Can I access some internal variables or apply an interceptor to add the necessary header information?
I am trying to use
api
to make request to Alpaca. The Readme.io demo page shows me that I can add Authorization Headers for the API Key & API Secret. When I follow the example, my code crashes with the following message:Here is the example:
Screenshot
The text was updated successfully, but these errors were encountered: