LoginSignup
1
1

More than 5 years have passed since last update.

slack API Enable Subscriptions のための challenge valueの受け取り方

Last updated at Posted at 2017-03-21

slackAPIのEvent Subscriptionsを書き始める際に、下記のようなchallenge/responseテストがあります。

2017-03-21_15h26_30.png

We’ll send an HTTP POST requests to this URL when events occur. As soon as you enter a URL, we’ll send a request with a challenge parameter, and your endpoint must respond with the challenge value.

POSTするというから、$_POSTで受け取れるのかというと受け取れません。
ただしくは下記で受け取れます。

<?php

$json = file_get_contents('php://input');
var_dump($json);

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1