Authentication Token doesn't work with bars API?



I’m testing calling Alpaca history bars by using the OAuth token:

but I receive this error:

code=401 message={"code":40110000,"message":"token is not authorized for this scope (Code = 40110000)"}

Anyone is familiar with this? it looks like Alpaca’s token authentication is good only to buy/sell/account-info.

Paper or Live Tradng?

Did you supply the headers for the GET call?
The headers should have the key & secret.
What library/language are you using?

That’s the point. With key/secret works, but with the OAuth2 token only account operations seem valid.

Ah, that could be the case. I don’t use OAuth2 at all in the AlpacaforR package, just the key/secret for all calls to ensure reliability. Sorry that didn’t help much.

I use the polygon api with my alpaca key. Works great for me plus they have more granular parameters when querying bars.

Hi all,
Thanks for all your responses. The OAuth token wasn’t able to work with the API, but the Alpaca team now is working on supporting it.