Gradio API. Again. WebSocket connection: HTTP 403

Hello.
Gradio space, public. Chat-bot works OK. Requests via Bash - OK.
But when trying to connect by API from Telegram-bot: server rejected WebSocket connection: HTTP 403.
On Space, requerements(parts):
huggingface-hub>=0.19.3
gradio==5.1.0
fastapi==0.112.2
gradio-client>=1.3.0
urllib3~=2.0

On hosting, requirements:
psutil
huggingface-hub>=0.19.3
openpyxl==3.1.2
pandas>=2.1.0
transformers==4.35.0
torch>=1.13.1
tokenizers>=0.15.0,<1.0
pymorphy2>=0.8
regex>=2023.10.3
python-telegram-bot==20.2
httpx>=0.24.1

gradio-client>=1.3.0.
fastapi==0.112.2

python-dotenv==1.0.0
requests>=2.28.2
urllib3~=2.0
python-telegram-bot>=20.2
aiohttp>=3.8.5
async-timeout==4.0.2

What else should i add in Requiremens or why API does not work?
Help pls! 2+ weeks trying to fix…

1 Like

The most common cause of connection failures from Gradio clients is a mismatch between the Gradio space and the Gradio client version.

1 Like