'Copyleak Webhook url is not being called
I'm integrating copyleaks API in my PHP project. Using this code for scanning the free text..
$webookUrl = 'https://example.com/prodparallel/copyleakCallback.php'; Here, I'm replacing the site name with example.com [I'm using my dev server URL]..
$submission = new CopyleaksFileOcrSubmissionModel(
"en",
$base64data,
"plagarism.txt",
new SubmissionProperties(
new SubmissionWebhooks("$webookUrl/{STATUS}"),
false,
null,
true,
6,
1,
true,
false,
new SubmissionAuthor('php-test'),
new SubmissionFilter(true, true, true),
new SubmissionScanning(true, new SubmissionScanningExclude('php-test-*'), null, new SubmissionScanningCopyleaksDB(true, true)),
new SubmissionIndexing((array)[new SubmissionRepository('repoId')]),
new SubmissionExclude(true, true, true, true, true),
new SubmissionPDF(true, 'title', 'https://lti.copyleaks.com/images/copyleaks50x50.png', false),
new SubmissionSensitiveData(false, false, false, false, false, false, false, false)
)
);
$copyleaks->submitFile($product,$loginResult,$scanId,$submission);
After this, I check in https://api.copyleaks.com/dashboard/businesses/scans, The scanning process is done.. but webhook URL is not triggered.
[Completion webhook is still sending]
I'm using a PHP page as webhook URL, here is the code of https://example.com /prodparallel/copyleakCallback.php
$uri_path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
$uri_segments = explode('/', $uri_path);
if(isset($uri_segments[2]) && $uri_segments[2] == 'completed'){ do this////
}else if(isset($uri_segments[2]) && $uri_segments[2] == 'error'){ do this//// }else{ do this//// }
Can anyone please help me to understand why my webhook URL is not being triggered after completion of the scanning process???
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
