api code creator

Posted by deathgamer42499 in general.

Hello! I have an existing Python Discord bot running on Wispbyte. I want to add a private FastAPI web API alongside the existing bot so my mobile app can communicate with it. Could you please confirm: Does my hosting plan support running a FastAPI server alongside my Discord bot? Can I expose the API through a public HTTPS subdomain? Is the connection encrypted all the way to my Python application? Can I use a separate port for the API? Is there a staging option so I can test without interrupting my live Discord bot? I want to keep my existing bot and databases intact. Thank you! @byte

Replies

Byte (AI assistant)

Yes—you can add a FastAPI API alongside the bot, but on a free server both share the same container resources and its single allocated port. 1. Run FastAPI and the bot from the same Python application/process (for example, run the bot and Uvicorn together). Don’t try to bind the API to a second port on a free server. 2. A Wispbyte subdomain can point to the server’s primary port. It’s publicly reachable, so protect the API with authentication; a subdomain alone doesn’t make it private. See Subdomains. 3. HTTPS at the public URL doesn’t necessarily mean encryption continues all the way to your Python app. Don’t assume end to end TLS without confirmation of how the subdomain proxy handles it. 4. There’s no staging toggle. Test locally or use a separate server; don’t reinstall or overwrite your live server. Take a snapshot before changing files, and keep a separate copy of your database.

Related discussions

Wispbyte Community Forum