Chatbot_Api_Call
# 🤝help
j
In Execute code i have added this code const userEmail = user.userEmail const apiUrl = http://localhost:8080/generate-report/$%7BuserEmail%7D // Make a GET request to the API endpoint await axios.get(apiUrl) But i am getting the output as below i am getting 404 error and i am trying on the same machine bot backend and botpress chatbot. Can you please with this. @fresh-fireman-491
f
Can you start out by publishing your bot and then trying to do this from the webchat
Wait
You have to make a public IP Adress.
You can also use NGROK to make a tunnel for it
For a service to be accessible publicly, the server must be bound to a public IP address or a domain name
You are using incorrect syntax in the url.
It should look like this instead:
You are missing the part handling the success or the error.
It could look like this:
j
Since i am using same system for backend project and chatbot so i used localhost:8080,
f
Have you forwarded the port?
j
Thank you @fresh-fireman-491 i tired this, it's working now.
f
Amazing!
Great work, and I am happy to hear that its working!