, " " " ".
When I send my messages via cURL, it does not show the βin channelβ slash command. I found that if I just included the header ("content-type header: application / json") and echo'd my answer with the json payload, including "in_channel", a slash command appeared. No API required!
Example:
$reply = "Whatever you want";
$data = array(
"response_type"=>"in_channel",
"text"=>$repy,
);
header('Content-Type: application/json');
echo json_encode($data);
Hope this helps, this is my first post, so be careful if I break any unspoken stackoverflow rules.
source
share