Hi,
My twitter app have access to account activity. and I’m trying to implement Twitter Webhook. When am trying to make post request to account_activity/webhooks am getting this error
stdClass Object
(
[errors] => Array
(
[0] => stdClass Object
(
[code] => 214
[message] => Webhook URL does not meet the requirements. Please consult: https://dev.twitter.com/webhooks/securing
)
)
)
Here is the request
$result = $twitter->post('account_activity/webhooks', [
'url' => urlencode('https://api.publicam.in/webhook/twitter.php')
]);
and for CRC Challenge am doing this in PHP
if (isset($_GET['crc_token'])) {
header('Content-Type: application/json');
$sha256_hash_digest = base64_encode(hash_hmac(
'sha256',
$_GET['crc_token'],
'<Consumer Secret>'
));
echo json_encode([
'response_token' => "sha256=$sha256_hash_digest"
]);
}
As per Twitter guidelines, output response is
200,
valid json with response_token as output
Latency is below 1 sec
When I try I don’t get any GET request from Twitter for CRC Challenge.