403 response forbidden

403 response forbidden
json_dump = r.json()
<Response [403]>
{‘message’: ‘forbidden.’}

Still getting this error in my paper trading account. Please help me to resolve this issue. I tried it in both V1 and V2 end points.
endpoint = “https://data.alpaca.markets/v1
endpoint = “https://data.alpaca.markets/v2

One needs to call the entire URL and not just the base URL (ie https://data.alpaca.markets/v1 and https://data.alpaca.markets/v2 won’t work). Maybe you have already tried and the above was just an example? The following will work to get the latest trades for AAPL (note you need to include your own API key and Secret key as headers)

GET https://data.alpaca.markets/v2/stocks/AAPL/trades/latest
1 Like

Hi Dan,

could you suggest some solution for the following issue.
i am trying windows 64 bit, python 3.6.6, Zipline -trader.

key_id: “<>"
secret: "<
base_url: https://paper-api.alpaca.markets
custom_asset_list: AAPL, TSLA, GOOG

.HTTPError: 403 Client Error: Forbidden for url: https://data.alpaca.markets/v1/bars/day?symbols=TSLA%2CAAPL%2CGOOG&limit=1000&end=2021-05-28T00%3A00%3A00%2B00%3A00

Hi Dan,
Can you help me understand that when I put what you have outlined in your May 13, 2021 post in Postman with both paper and live keys I get {‘message’: ‘forbidden.’} for both.
This was working in July 2021 but not in November 2021.
Has something changed?
If so, what changed and is there a resolution?

Thank you this helped. I mainly had to make sure the initialization was correct.