Live data auth failed

When I try to subscribe to real-time quote data, it fails with the following error.

PS C:\Users\name\TestDir> & c:/Users/name/TestDir/.venv/Scripts/python.exe c:/Users/name/TestDir/api4.py
error during websocket communication: auth failed
Traceback (most recent call last):
  File "C:\Users\name\TestDir\.venv\Lib\site-packages\alpaca\data\live\websocket.py", line 343, in _run_forever
    await self._start_ws()
  File "C:\Users\name\TestDir\.venv\Lib\site-packages\alpaca\data\live\websocket.py", line 135, in _start_ws   
    await self._auth()
  File "C:\Users\name\TestDir\.venv\Lib\site-packages\alpaca\data\live\websocket.py", line 126, in _auth       
    raise ValueError(msg[0].get("msg", "auth failed"))
ValueError: auth failed

I can receive historical data, so I am fairly certain the API keys I am using are correct. I am using a free account so I have specified the URL to use IEX data, though I get the same error without specifying the URL. I am using python in vscode:

from alpaca.data.live import StockDataStream

async def quote_handler(quote):
    
    print(quote)

API_KEY = ""
SECRET_KEY = ""

stream = StockDataStream(API_KEY, SECRET_KEY, url_override = "wss://stream.data.sandbox.alpaca.markets/v2/iex")
stream.subscribe_quotes(quote_handler, "TSLA")
stream.run()

Hey :wave:

Are you sure you want to use the sandbox environment? What code are you using to receive historical data successfully?

Try simply

stream = StockDataStream(API_KEY, SECRET_KEY)