I am trying to make a connection using Web sockets Client API. For making the connection, a "Play Session" cookie needs to be passed for verifying the user.
Following is my code:
async def streaming_data(url, play_session):
try:
async with websockets.connect(url) as websocket:
response = await websocket.recv()
data = reponse.read()
except Exception as e:
print('Error in making the Websocket Connection!!')
print(e.args)
print(data)
Note: Play Session is the cookie.
I am getting the error : "Status code not in 101:403" I am using websockets library for making the connection.
I'm a beginner, so any help would be much appreciated.