You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
ivan006
5 years agoHelpful | Level 6
dropbox isn't sending webhooks
what i tried the below code is my webhook endpoint - it responds to the validation request - and it generates and stores a timestamp into a file called "GTest.txt" each time a request is sent to t...
- 5 years ago
Ok i had to set an exception in my cross-site request forgery middleware lol
https://www.youtube.com/watch?v=nGXo061pibU&t=890sthe webhook error messages in the app console is what save me! but it takes a couple of errors before it will log them unfortunately :/
Mohdsyafiq
5 years agoNew member | Level 2
public function webhook_endpoint()
{
$report_object = new report;
$result = "";
$file_content_prefix = "";
if (isset($_GET['challenge'])) {
$result = $_GET['challenge'];
$file_content_prefix = "Challange";
} elseif ($report_object->webhook_endpoint_authenticate() == 1) {
$file_content_prefix = "Authenticated";
} else {
header('HTTP/1.0 403 Forbidden');
$file_content_prefix = "Not authenticated";
}
$timestamp = date('Y-m-d h:i:s a', time());
$file_content = $file_content_prefix." ".$timestamp;
$file_name = "GTest.txt";
file_put_contents($file_name, $file_content);
return $result;
}
{
$report_object = new report;
$result = "";
$file_content_prefix = "";
if (isset($_GET['challenge'])) {
$result = $_GET['challenge'];
$file_content_prefix = "Challange";
} elseif ($report_object->webhook_endpoint_authenticate() == 1) {
$file_content_prefix = "Authenticated";
} else {
header('HTTP/1.0 403 Forbidden');
$file_content_prefix = "Not authenticated";
}
$timestamp = date('Y-m-d h:i:s a', time());
$file_content = $file_content_prefix." ".$timestamp;
$file_name = "GTest.txt";
file_put_contents($file_name, $file_content);
return $result;
}
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,909 PostsLatest Activity: 4 hours agoIf you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!