Step 1. Auth Token Registration Description: The first step is to register with your auth token to generate an UUID.
Request Response
Copy {
"action" : "message" ,
"payload" : {
"type" : "auth_token_register" ,
"body" : {
"auth_token" : "{Your_Auth_Token}"
}
}
}
Copy {
"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.
Request Response
Copy GET /private/api-get-presigned-url/?file_name=Your_File.zip HTTP/1.1
Host: api.solidityscan.com
Authorization: Bearer {Your token}
Copy {
"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
Request Response
Copy {
"action": "message",
"payload": {
"type": "private_project_scan_initiate",
"body": {
"file_urls": [
"S3_signed_URL"
],
"project_name": "TestRemix",
"project_type": "new"
}
}
}
Copy {
"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: