You need to add the case to verify your webhook:
case 'hook.verify':
PodioHook::validate($_POST['hook_id'], array('code' => $_POST['code']));
break;
Try this, i'm sure it will work!
문제
i'm creating a PHP script to integrate with Podio.. I think i have all right, but i can't verify the webhook from the Podio website.. Can you tell me what i'm doing wrong? This is my code:
require_once '../lib/Podio/PodioAPI.php';
require_once '../lib/Podio/__cfg.php';
Podio::setup(CLIENT_ID, CLIENT_SECRET);
if (!Podio::is_authenticated()) {
Podio::authenticate('app', array('app_id' => APP_ID, 'app_token' => APP_TOKEN));
}
if ($_POST) {
switch ($_POST['type']) {
case 'item.create' :
$item = PodioItem::get($_POST['item_id']);
doMyStuff('create',$item);
break;
case 'item.update' :
$item = PodioItem::get($_POST['item_id']);
doMyStuff('update',$item);
break;
}
}
해결책
You need to add the case to verify your webhook:
case 'hook.verify':
PodioHook::validate($_POST['hook_id'], array('code' => $_POST['code']));
break;
Try this, i'm sure it will work!