Hi, I have been trying to use the Account Activity API but keep getting a “Webhook URL does not meet the requirements” error.
I know that it isn’t response time. Testing the website https://webhook.getspark.co.uk/twitter on pingdom gives a latency of less than one second and the Twitter API responds in less than a second with the error.
I am sure that it is the response token but I don’t know why it isn’t working. I followed the guide one of the twitter staff recommended in this post Validating CRC for Webhooks to create my response token.
public function get ( Request $request )
{
return response ()->json ([
'response_token' => 'sha256=' . base64_encode ( hash_hmac ( 'sha1' , $request->input ( 'crc_token' ) , env ( 'TWITTER_SECRET' ) , true ) ),
], 200 );
}
Using the crc_token: MzkxMjdiNDctODBmZi00YTJiLWFmM2UtM2NjOTllZDg3OGI2
My server gives the response: {"response_token":"sha256=mfD4IDOTTX0NsqNxpk0xHHTQUZI="}
I hope that one of you can help 