ACMatUC/groupme-bot-starter

Getting POST from bot

Opened this issue · 7 comments

Hey Noah great tutorial! I am also a UC student. I am having an issue getting a POST response from my bot (running on my local machine) when I do the /shrug message. I used localtunnel like mentioned in your tutorial, edited it in my .env file, but it will not respond. Any ideas?

Hey @jordarn96 - not Noah but I might be able to help a little bit. My first thoughts on this are checking to see if your machine is accessible through localtunnel. When you get the localtunnel up and running you should try using 'ping' or 'curl' on your local machine to try and see if your url is accessible.

If you join our slack channel [acmcincy.slack.com] and ping me in #homework-help, I can help in a little more real time. My username is "@capn_kurt"

I followed the steps and got to the "Bot is responding to a GET request... hey there!" message, but when I type /shrug into group me I do not get the response back from the bot. Any thoughts on what needs to be done?

You could add a console.log to the top of this function to see if your bot is receiving the POST request from groupme. If it prints out, then something is wrong with the code. If it doesn't print out, it tells you something is wrong with your configuration - maybe localtunnel is incorrectly configured and your bot is unreachable to groupme

Thank you @kurtlewis I got it up and running.

Great! How about you @jordarn96?

@kurtlewis I also get the "Bot is responding..." message on my localhost, but following your suggestion on January 4, console.log() doesn't print out. Do you know how I can correctly configure my local tunnel? I followed everything on this guide.

Hey @question-james! This repo is pretty old, so I'm not sure even if you have everything set up perfectly it will still work, if localtunnel or groupme's API have changed it could break this tutorial.

If you've got your server running on localhost, and you've installed localtunnel, you can start localtunnel with lt --port 3000 (assuming you've started your server on port 3000). If localtunnel doesn't give you any errors, you can test that it worked by during curl <the url localtunnel tells you> and verifying that you get a response. If you do, everything is working and the last step is plugging the url localtunnel gave you into the groupme API.