I am trying to register a webhook, but I get the message:
[{“code”:214,“message”:“Webhook URL does not meet the requirements. Invalid CRC token or json response format.”}]}’ } }

Response generated in this way (php):

  $hash = hash_hmac('sha256', $crc_token, $consumer_secret, true);
  $response = array(
  	'response_token' => 'sha256=' . base64_encode($hash)
  );
  return json_encode($response); 

crc_token is being received and response_token is generated and sent with value…
The account is: rankingmetro, app id 8755617

Any suggestion of what the problem may be? Thanks

It worked adding:

  header("HTTP/1.1 200 OK");
  header('Content-Type: application/json;charset=utf-8');
  return json_encode($response);
  exit();
1 Like

Great, glad you got it working and thanks for sharing your solution!

1 Like

Now the webhook created, says “valid = false”, what could be the reason?

In addition, deleting it, and registering again returns the same error mentioned in this post.

If the webhook became invalid, it may have failed the regular inbound CRC check.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.