API
Barcode API  Currency API  Image Recognition & Processing API  Document & Conversion API  OCR API  Security API  Validate API  Video API  Virus Scan API  NLP API 

Step 1 - Install the Client SDK






Step 2 - Get Started with Example Code

/virus/scan/cloud-storage/aws-s3/single
Scan an AWS S3 file for viruses
/virus/scan/cloud-storage/aws-s3/single/advanced
Advanced Scan an AWS S3 file for viruses
/virus/scan/cloud-storage/azure-blob/single
Scan an Azure Blob for viruses
/virus/scan/cloud-storage/azure-blob/single/advanced
Advanced Scan an Azure Blob for viruses
/virus/scan/cloud-storage/gcp-storage/single
Scan an Google Cloud Platform (GCP) Storage file for viruses
/virus/scan/cloud-storage/gcp-storage/single/advanced
Advanced Scan an Google Cloud Platform (GCP) Storage file for viruses
/virus/scan/cloud-storage/sharepoint-online/site/advanced
Advanced Virus Scan a file in a SharePoint Online Site Drive
/virus/scan/cloud-storage/sharepoint-online/site/single
Virus Scan a file in a SharePoint Online Site Drive
/virus/scan/file
Scan a file for viruses
/virus/scan/file/advanced
Advanced Scan a file for viruses
/virus/scan/website
Scan a website for malicious content and threats

Advanced Virus Scan a file in a SharePoint Online Site Drive

Advanced Virus Scan the contents of a single SharePoint Online Site Drive file and its content for viruses and threats. Advanced Scan files with 360-degree Content Protection across Viruses and Malware, executables, invalid files, scripts, and even restrictions on accepted file types with complete content verification. Customize threat rules to your needs. Leverage continuously updated signatures for millions of threats, and advanced high-performance scanning capabilities. Over 17 million virus and malware signatures. Continuous cloud-based updates. Block threats beyond viruses including executables, scripts, invalid files, and more. Optionally limit input files to a specific set of file types (e.g. PDF and Word Documents only). Wide file format support including Office, PDF, HTML, Flash. Zip support including .Zip, .Rar, .DMG, .Tar, and other archive formats. Multi-threat scanning across viruses, malware, trojans, ransomware, and spyware. High-speed in-memory scanning delivers subsecond typical response time. To get the Client ID and Client Secret, follow these steps: (1) Navigate to the Azure Portal and click on Azure Active Directory, (2) click on App Registrations on the left hand side, (3) click on Register Application, (4) Name the application CloudmersiveAntiVirus and click on Register, (5) Get the client ID by clicking on Overview and copying the value labeled Application (client) ID, (6) click on Certificates and Secrets, (7) click on New client secret, choose a longer expiration and give the secret a name, (8) copy the secret value to the clipboard and save it securely, this is your Client Secret, (9) Now we need to grant permissions to SharePOint; click on API Permissions on the left hand side, (10) click on Add a permission and choose Microsoft Graph, (11) click on Application Permissions, (12) search for Sites.FullControl.All, (13) Click on Add Permissions, (14) now navigate back to Azure Active Directory and click on Enterprise Applications, click on CloudmersiveAntiVirus and click on Permissions, and (15) click on Grant Admin Consent.

package main

import (
     "fmt"
     "net/http"
     "io/ioutil"
)

func main() {

     url := "https://api.cloudmersive.com/virus/scan/cloud-storage/sharepoint-online/site/advanced"
     method := "POST"

     client := &http.Client {
     }
     req, err := http.NewRequest(method, url, nil)

     if err != nil {
          fmt.Println(err)
          return
     }
     req.Header.Add("clientID", "")
     req.Header.Add("clientSecret", "")
     req.Header.Add("sharepointDomainName", "")
     req.Header.Add("siteID", "")
     req.Header.Add("tenantID", "")
     req.Header.Add("filePath", "")
     req.Header.Add("itemID", "")
     req.Header.Add("allowExecutables", "")
     req.Header.Add("allowInvalidFiles", "")
     req.Header.Add("allowScripts", "")
     req.Header.Add("allowPasswordProtectedFiles", "")
     req.Header.Add("allowMacros", "")
     req.Header.Add("allowXmlExternalEntities", "")
     req.Header.Add("restrictFileTypes", "")
     req.Header.Add("Apikey", "YOUR-API-KEY-HERE")

     res, err := client.Do(req)
     if err != nil {
          fmt.Println(err)
          return
     }
     defer res.Body.Close()

     body, err := ioutil.ReadAll(res.Body)
     if err != nil {
          fmt.Println(err)
          return
     }
     fmt.Println(string(body))
}