Polygon API unauthorized

I have a funded account with Alpaca still getting this error while using the polygon api -

401 Client Error: Unauthorized for url: https://api.polygon.io/v2/aggs/ticker/AAPL/range/1/day/2019-01-01/2019-02-01?unadjusted=False&apiKey=******

The api key and secret is setup as my Alpaca key and secret.

Thanks!