Skip to content
Display

Embed Hosted Web Report

The Copyleaks Hosted Web Report provides a seamless way to display detailed plagiarism and AI detection reports within your application. This guide will walk you through the process of embedding the report.

  1. Before you begin, ensure you have the following:

    • A way to generate the required JSON data for the report. This is usually done by using the Copyleaks API to perform a scan and then exporting the results.
    • A publicly accessible server to host the JSON data file.

  2. The Hosted Web Report requires a JSON file with a specific structure. This file contains all the necessary information to render the report correctly.

    Here is an example of the JSON data:

    {
    "input": {
    "requestParams": {
    "headers": {
    "Authorization": "***token****",
    "header_key2": "header_value1",
    "header_key3": "header_value2"
    }
    },
    "crawledVersion": "https://example.com/api/scans/scanid/scan-source.json",
    "completedWebhook": "https://example.com/api/scans/scanid/complete_result.json",
    "writingFeedback": "https://example.com/api/scans/scanid/writing_feedback.json",
    "result": "https://example.com/api/scans/scanid/results/{RESULT_ID}.json",
    "pdf": "https://example.com/api/scans/scanid/report.pdf"
    },
    "customizations": {
    "companyLogo": "https://example.com/logo.svg",
    "accessExpired": {
    "httpResponsesCode": [
    403,
    401
    ],
    "customMessage": "*Custom Error Message*",
    "redirectUrl": "https://example.com/login"
    }
    }
    }

  3. The JSON file must be hosted on a publicly accessible server. The URL of this file will be used to load the report.

    Important Considerations:

    • The URL must be publicly accessible.
    • Your server must allow Cross-Origin Resource Sharing (CORS) to the https://report.sand-box.info domain.

  4. You can embed the Hosted Web Report in your application using an <iframe> or by opening it in a new window. The URL for the report is:

    https://report.sand-box.info/v2.0/preview?params=<YOUR_JSON_FILE_URL>

    Replace <YOUR_JSON_FILE_URL> with the URL of the JSON file you hosted in the previous step.

    Example:

    <iframe src="https://report.sand-box.info/v2.0/preview?params=https://my_domain.com/my_scan_public_url.json"
    width="100%"
    height="800px"
    frameborder="0">
    </iframe>

If you have any questions or need help, please contact our support team. We’re here to assist you with any integration needs.