Not working Locally
ayush20501 opened this issue · comments
i am running the free-trail main.py locally but it's showing not found error!
Can you send screenshots of the error?
It will be helpful for fixing.
Also let me know what have you done so that I can reproduce the error
To run your app in local you need to follow these steps:
mkdir chatgpt
cd chatgpt
python3 -m venv
For Linux un: source venv/bin/activate
For Windows run: venv/Scripts/activate
pip install twilio flask requests
Create a main.py in root directory
The hierarchy should be like this:
Copy the code from Free-Trial (Code Updated) into main.py
NGROK Local Deployment:
Now download ngrok
- https://ngrok.com/download
- Extract the zip and add the folder to the environment variables
- Login to ngrok website: https://dashboard.ngrok.com/get-started/setup
- run ngrok config add-authtoken in terminal
- run ngrok http 5000
The output should be like
- Copy the Forwarding URL from the terminal and paste it in Twilio console and WhatsApp sandbox settings:
Paste the URL appended with /bot
Original Url: https://2262-49-204-133-70.ngrok-free.app/
Appended Url:https://2262-49-204-133-70.ngrok-free.app/bot
Now run the main.py and send message in your WhatsApp
It should work fine
I already do the step above, but in ngrok it returned a 403 Forbidden when I send message in whatsApp, can you help?
Make sure you have Paid OPEN-API Key. Free open-api key does not work.
Also append /bot similar to this https://2262-49-204-133-70.ngrok-free.app/bot but replace with your url that is generated from ngrok.
Please let me know if this works and make sure to follow all the steps without missing anything.