5

I am trying to build a calling app on slack that invokes a voip app installed on the computer. So when the slack app is given a particular command with a number it should invoke this desktop app and allow the user to make a call.

I have given the slack app calls:read calls:write permissions but when i post a message from the service back to slack on response_url i am getting 500 error on slack.

slack_message = {
"response_type": "Call",
"call_initiation_url": "https://example.com",
"desktop_protocol_call_initiation_url": "sip:+15551231234?action=call"
}

header = {'Content-Type': 'application/json'}
response = requests.post(response_url, headers=header, data=json.dumps(slack_message))

Slack show 500 error.

However, posting back to response_url works when i post back a simple message, like shown below and i see it on the slack.

slack_message2 = {
"response_type": "in_channel",
"text": "It's 80 degrees right now."
}

Could some help in understanding what is going wrong ? I am stuck here.

user948999
  • 143
  • 1
  • 2
  • 6
  • I'm having the same issue here. When setting `response_type` to `call`, Slack respond 500 with no additional information; but it works fine with other `response_type`, say `in_channel` for example – wiser Sep 22 '21 at 04:29
  • Same here, for the response to a `SlashCommand`, typescript says `Type '"call"' is not assignable to type '"in_channel" | "ephemeral" | undefined'.` – Hollyol Aug 23 '22 at 08:37

1 Answers1

0

In my case the issue was caused by calling:

await respond('') instead of await respond('success')

I assume the tutorials advocating using respond('') for a positive response are not up to date. There are a few other direct mistakes I have found in the bolt docs thus far; so it seems bolt may have changed a bit since the docs were written without updating the docs.

Dessus
  • 2,147
  • 1
  • 14
  • 24