SolidityScan Security API
  • Introduction
    • 📋Overview of SolidityScan
    • 💡Key Features
    • 💻Supported Platforms
  • Getting Started
    • ⭐Web Application
      • ⏩QuickScan
      • Scan a Online Git Repository
      • Scanning a Deployed Contract
      • 🗃️Upload and Scan Solidity Project
      • 👨‍💼Organisation
    • ⚙️APIs
      • 🔏Generating Private Key
      • 🌐SolidityScan Private API
        • WebSocket API
          • Project Scan
          • Verified Contract Scan
          • Project Quick Scan
          • Project Threat Scan
          • File Upload Scans
          • Scan Lifespan and Events
        • HTTP API
      • RustScan API
      • 🔐Vulnerability Score API V1
      • 💢ThreatScore API V1
      • ThreatScore API V2
      • SolidityScan WebSocket Events
        • Private QuickScan WS
        • 🔐Private ThreatScan WS
        • WS references
      • ⚙️Postman Collection
      • Platform Info
    • 📑SolidityScan SDK
    • Platform Parameters
      • Arbitrum
        • Arbiscan
        • Blockscout
      • Asset Chain
        • Blockscout
      • Astar
        • Blockscout
        • SubScan
      • Aurora
        • Aurora Explorer
      • Avalanche
        • Snowtrace
        • Routescan
      • Base
        • BaseScan
        • Blockscout
      • BlackFort
        • Blockscout
      • BOBA
        • Routescan
      • Binance
        • Bscscan
      • BuildBear
        • BuildBear
      • Camino
        • Blockscout
      • Celo
        • Celo Explorer
        • Blockscout
      • Chiliz
        • Routescan
      • Connext
        • Blockscout
      • Creditcoin
        • Blockscout
      • Cronos
        • Cronos Explorer
      • Darwinia
        • SubScan
      • Ethereum Classic
        • Blockscout
      • Ethereum
        • Etherscan
        • Blockscout
      • Etherlink
        • Blockscout
      • Fantom
        • Ftmscan
      • 5ireChain
        • 5ireChain
      • Flare
        • Routescan
      • Fuse
        • Fuse Explorer
        • Blockscout
      • Gnosis
        • Blockscout
      • Hemi
        • Blockscout
      • Immutable
        • Blockscout
      • IOTA
        • Blockscout
      • Japan Open Chain
        • Blockscout
      • Lightlink
        • Blockscout
      • Linea
        • LineaScan
        • Blockscout
      • Lisk
        • Blockscout
      • LUKSO
        • Blockscout
      • Metis
        • Routescan
      • Moonbeam Network
        • SubScan
      • Neon
        • Blockscout
      • Nordek
        • Nordekscan
      • Omni
        • Blockscout
      • One World Chain
        • Blockscout
      • Optimism
        • Optimism
        • Blockscout
      • Peaq Network
        • SubScan
      • Playnance
        • Blockscout
      • Polkadot
        • SubScan
      • Polygon
        • Polygonscan
        • Blockscout
      • re.al
        • Blockscout
      • Redstone
        • Blockscout
      • Reef
        • ReefScan
      • Reya
        • Blockscout
      • Rootstock
        • Blockscout
      • Shibarium
        • Blockscout
      • Shimmer
        • Blockscout
      • Soneium
        • Blockscout
      • Stability
        • Blockscout
      • Tron
        • Tronscan
      • XDC
        • BlocksScan
      • Zetachain
        • Blockscout
      • zkSync
        • Blockscout
  • Integrations
    • GitHub
    • BitBucket
    • GitLab
    • Slack
    • VS Code
    • Remix
  • Audit Reports
    • 📒QuickScan Report
    • 📢Generate and Publish Reports
  • Pricing
    • 💰SolidityScan Pricing
Powered by GitBook
On this page
  1. Getting Started
  2. APIs
  3. SolidityScan Private API
  4. WebSocket API

File Upload Scans

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

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

Step 2 - Fetching a pre-signed URL

file_name - Supported file name extensions .sol & .zip It is required to supply a file name to generate a pre-signed S3 URL from our end. Note this is just a file name and not an actual file upload call.

GET /private/api-get-presigned-url/?file_name=Your_File.zip HTTP/1.1
Host: api.solidityscan.com
Authorization: Bearer {Your token}
{
    "status": "success",
    "result": {
        "url": "S3_signed_URL"
    }
}

The value of url in response is the signed URL where the sol or zip files need to be uploaded.

Step 3 - Scan initiation Request

{
    "action": "message",
    "payload": {
        "type": "private_project_scan_initiate",
        "body": {
            "file_urls": [
                "S3_signed_URL"
            ],
            "project_name": "TestRemix",
            "project_type": "new"
        }
    }
}
{
    "type": "scan_status",
    "request_uuid": "e58492f72f9b7d27a5c75478a2e529eb",
    "payload": {
        "scan_id": "31118a10c7fe1309",
        "scan_status": "scan_done",
        "project_id": "4c3d528a944e7b56f696c87447609a7d",
        "scan_details": {
            "link": "JSON_Response_Link"
        }
    },
    "event_timestamp": "2024-04-19 11:38:05.735806"
}

The value of the link is the s3 link of the JSON response of the scan result data.

Sample Response:

PreviousProject Threat ScanNextScan Lifespan and Events

Last updated 6 months ago

⚙️
🌐
7KB
response.json