Hi everybody,
i decided to make it with php, so i call the webservice account_activity/all/env-beta/webhooks, but it return me the error :
(int) 0 => object(stdClass) {
code => (int) 214
message => 'Webhook URL does not meet the requirements. Invalid CRC token or json response format.'
}
I put you my code behind this url :
if (isset($query['crc_token'])) {
$token = trim($query['crc_token']);
$consumerKey = trim($entry->page->twitter_consumer_secret);
$sha256_hash_digest = hash_hmac('sha256', $token, $consumerKey);
$result = json_encode([
'response_token' => "sha256=".base64_encode($sha256_hash_digest)
]);
return $this->response->withType('application/json')->withStringBody($result)->withStatus(200)->withCharset("UTF-8");
}
Thanks for your help.