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
  • Tag a webhook
  • Initiate New Scan
  1. Getting Started
  2. APIs

ThreatScore API V2

Tag a webhook

POST api.solidityscan.com/api-tag-webhook/

This endpoint allows users to register a webhook URL where SolidityScan will send notifications regarding the status of various scans and events. By tagging an endpoint, users can ensure they receive updates directly to their specified URL.

Headers

Name
Value

Content-Type

application/json

Authorization

Token <token>

Body

Name
Type
Description

endpoint_url*

string

The URL where SolidityScan will send event notifications.

endpoint_headers

json

Any headers you supply will be added to the request headers for the requested endpoint.

Response

{
    "status": "success",
    "message": "Endpoint successfully tagged."
}
{
  "error": "Invalid request"
}

Example

curl --location 'https://api.solidityscan.com/api-tag-webhook/' \
--header 'Authorization: Token <Your Token>' \
--header 'Content-Type: application/json' \
--data '{
    "endpoint_url": "<Your EndPoint URL>",
    "endpoint_headers": {
        "api_key": "val_xyz"
    }
}'
import requests
import json

url = "https://api.solidityscan.com/api-tag-webhook/"

payload = json.dumps({
  "endpoint_url": "<Your EndPoint URL>"
})
headers = {
  'Authorization': 'Token <Your Token>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Initiate New Scan

GETapi.solidityscan.com/api/v2/threatscan/{contract_platform}/{contract_chain}/{contract_address}

This endpoint initiates a new scan for a specified smart contract deployed on an EVM chain. Users need to provide the platform (e.g., etherscan), the chain (e.g., mainnet), and the contract address. Once the scan is initiated, its status and events will be pushed to the registered webhook URL.

Headers

Name
Value

Authorization

Token <token>

Response

{
    "data": "Request is being processed. Events will be pushed on endpoints configured",
    "scan_id": "de2bc482ff316c0b",
    "scan_status": "initialised",
    "contract_address": "0x8f9b4525681F3Ea6E43b8E0a57BFfF86c0A1dd2e",
    "contract_platform": "etherscan",
    "contract_chain": "mainnet",
    "request_uuid": "7f91377334a2594d2c8d74cb25316993",
    "status": "success"
}
{
    "status": "failed",
    "message": "Contract address validation failed"
}

Example

curl --location 'https://api.solidityscan.com/api/v2/threatscan/etherscan/mainnet/0x4d1C297d39C5c1277964D0E3f8Aa901493664530' \
--header 'Authorization: Token <Your Token>'
import requests

url = "https://api.solidityscan.com/api/v2/threatscan/etherscan/mainnet/0x4d1C297d39C5c1277964D0E3f8Aa901493664530"

payload = {}
headers = {
  'Authorization': 'Token <Your Token>'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

After submitting a request, you will receive events on the webhook. Once the scan is completed and a new request for the same token is sent, you will receive a response similar to this:

Note: No event will be pushed if the same contract is scanned again within 24 hours.

PreviousThreatScore API V1NextSolidityScan WebSocket Events

Last updated 1 month ago

⚙️
49KB
response.json