0
 app.command("/hello", (req, ctx) -> {
            List<LayoutBlock> blocks = asBlocks(
                    section(section -> section.text(markdownText("select the meeting option"))),
                    actions(actions -> actions.elements(asElements(multiUsersSelect(b -> b.actionId("users-select").placeholder(plainText("select a option"))))))
            );
            return ctx.ack(blocks);
        });

This is my code. On /hello command , multi user select menu should appear but instead I am getting this error /hello failed with the error "invalid_blocks".

I have also given users:read permission for bot.

What could be the reason?

Update:

I was able to make it work with this code

section(section -> section.blockId("select-users").text(markdownText("*Select Users*")).accessory(multiUsersSelect(select -> select.actionId("select-user-action").placeholder(plainText("Select users that should recieve your survey")))))

                
akshay
  • 13
  • 6
  • looks good to me. Does a simple ctx.ack("select the meeting option") work? have you narrowed down which part of your code causes the issue? how about app.command("/ping", (req, ctx) -> { return ctx.ack(asBlocks( section(section -> section.text(markdownText(":wave: pong"))), actions(actions -> actions .elements(asElements( button(b -> b.actionId("ping-again").text(plainText(pt -> pt.text("Ping"))).value("ping")) )) ) )); }); [from the manual](https://slack.dev/java-slack-sdk/guides/bolt-basics)? – eis Jan 31 '21 at 08:54
  • The code you mentioned in the comment is working fine. The problem is happening while using multiUsersSelect or multiChannelsSelect with in the actions. – akshay Feb 02 '21 at 18:28
  • ok. remember to add the solution as an answer to the question, and mark it as accepted, if it fixed your problem. – eis Feb 03 '21 at 12:26

0 Answers0