python-message-menu-example icon indicating copy to clipboard operation
python-message-menu-example copied to clipboard

Menu options not loading

Open ReenaAcharya opened this issue 7 years ago • 9 comments

Hi,

While executing the script I message menus doesn't load.It takes time. Any suggestions here.

Thanks.

ReenaAcharya avatar Mar 07 '18 14:03 ReenaAcharya

Hi Reena,

Make sure your options endpoint and action endpoint are accessible to Slack. This example walks through using ngrok to allow Slack to make requests to your server

Roach avatar Mar 07 '18 17:03 Roach

Hi,

When I pass message menu manually in attachment_json it shows up in message menu. When I use "data_source": "external". It doesn't show up in message menu. Also when selecting the message menu I get no response.

Thanks.

ReenaAcharya avatar Mar 09 '18 08:03 ReenaAcharya

Do you get a response if you request the menu options from your endpoint manually with curl? 🤔

Roach avatar Mar 09 '18 16:03 Roach

@Roach, I am having the same issue. I've been struggling with this for the last few days. I tried your example line for line (except replacing the tokens and channel of course). I tried with my own code and a button and also just got the following message. I tried using the https://slack.com/oauth/authorize API as well. I successfully got my bot token back, but I could have just copied this from the "OAuth & Permissions" page anyways.

Oh no, something went wrong. Please try that again.


Here is with your example code:

image Never loads.

image My log is empty, it looks like slack is never sending the POST request to my webservice.

image Here is what my interactive component settings look like at api.slack.com

EDIT: Other HTTP POST's do work to the webservice. I tested with Postman.

ghost avatar Mar 22 '18 07:03 ghost

Wow, I just realized something really really stupid..... Slack isn't a local app haha, no wonder it cant reach 127.0.0.1. I wasted like 5 hours on that, that's embarrassing.

ghost avatar Mar 22 '18 07:03 ghost

@MartYtheSpaceBaker no worries! I will add some content around using ngrok to the README.

The example for our Events API Adapter has a pretty good guide: https://github.com/slackapi/python-slack-events-api/tree/master/example

@ReenaAcharya can you confirm that you're using localtunnel or ngrok to make your app's API endpoints available to Slack's POSTs?

Roach avatar Mar 22 '18 16:03 Roach

Hey, integration with ngrok worked for me. Although, when I try to change menu values, I get the same list items and corresponding responses again.

parinitahaldar77 avatar Apr 24 '19 10:04 parinitahaldar77

I did try localtunnel.me and it worked OK but when I put it on my server smth is not OK, it's not called message menus and Interactivity url. My urls are https and accessible. Other endpoints, like commands, works OK, but this one doe not. Any ideas? How can we see some debug from slack side?

botzill avatar Apr 25 '19 21:04 botzill

use ngrok to tunnel slack request to your localhost. this link documentation contain how to set up ngrok : https://github.com/slackapi/python-slack-events-api/tree/master/example your message just shows loading because the endpoints is mixed up. REQUEST URL is the slack/message-options and MENU URL is slack/message-actions hope this helps.

danny329 avatar Jun 23 '20 05:06 danny329