> For the complete documentation index, see [llms.txt](https://apidoc.solidityscan.com/solidityscan-security-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidoc.solidityscan.com/solidityscan-security-api/getting-started/apis/solidityscan-websocket-events/private-threatscan-ws.md).

# Private ThreatScan WS

The flow for quickscan ws is as follows:

* Register the token using auth\_token\_register event
* Using the token, send an event to perform a threatscan

1\. WebSocket API Documentation

* **URL:** `api-ws.solidityscan.com`
* **Protocol:** wss
* **Description:** This request requires authorization. The bearer token is sent in the `auth_token`request parameter.

Step 1. Auth Token Registration Description: The first step is to register with your auth token to generate an UUID.

{% tabs %}
{% tab title="Auth Token Register" %}

```
{
    "action": "message",
    "payload": {
        "type": "auth_token_register",
        "body": {
            "auth_token": "{Your_Auth_Token}"
        }
    }
}
```

{% endtab %}

{% tab title="Auth Token Register Ack" %}

```
{
    "type": "auth_token_register",
    "request_uuid": "Your_UUID",
    "payload": {
        "message": "Auth token registered."
    },
    "event_timestamp": "2024-04-19 11:37:17.854547"
}
```

{% endtab %}
{% endtabs %}

* **contract\_address**: The address of the contract to be scanned.
* **contract\_platform**: The platform which the contract belongs to.
* **contract\_chain**: The chain which the contract belongs to.

{% tabs %}
{% tab title="Private ThreatScan Initiate" %}

```
{
    "action": "message",
    "payload": {
        "type": "private_threat_scan_initiate",
        "body": {
            "contract_address": "0xc2498D4fB17A956A847091D088f1D7f6fE745f5B",
            "contract_platform": "etherscan",
            "contract_chain": "mainnet"
        }
    }
}
```

{% endtab %}

{% tab title="ThreatScan Response" %}

````
```postman_json
{
    "type": "quick_scan_status",
    "request_uuid": "7b01a6f0f9e35feb448f1ce66f7b78e3",
    "payload": {
        "scan_id": "5bb187534473eb2e",
        "scan_status": "scan_done",
        "project_id": "3dd7c8c2f34eeeba94537ad4c7ee8901",
        "scan_details": {
            "compilerversion": "v0.8.23+commit.f704f362",
            "connection_id": "",
            "contract_address": "0xc2498D4fB17A956A847091D088f1D7f6fE745f5B",
            "contract_chain": "mainnet",
            "contract_implementation_address": "",
            "contract_platform": "etherscan",
            "contract_url": "https://etherscan.io/address/0xc2498D4fB17A956A847091D088f1D7f6fE745f5B",
            "contractname": "TRIUMPH",
            "currency": "ETH",
            "evmversion": "Default",
            "is_quick_scan": true,
            "licensetype": "MIT",
            "multi_file_scan_status": "scan_done",
            "multi_file_scan_summary": {
                "issue_severity_distribution": {
                    "critical": 5,
                    "gas": 89,
                    "high": 0,
                    "informational": 37,
                    "low": 6,
                    "medium": 7
                },
 .......
````

{% endtab %}
{% endtabs %}

{% file src="/files/77l2eHz6kGsb4f46oU9q" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://apidoc.solidityscan.com/solidityscan-security-api/getting-started/apis/solidityscan-websocket-events/private-threatscan-ws.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
