Ready-to-use code examples for integrating the 602TechSec List Management API into your applications. Download complete helper classes and see working examples in multiple languages.
Complete VB.NET client library with helper methods for all API operations.
Imports System.Net.Http
' Initialize the client
Dim client = New ListManagementClient("your-api-key-here")
' Add IP to whitelist
Dim result = Await client.AddIpAddressAsync("192.168.1.100", "whitelist")
Console.WriteLine($"Success: {result.Success}, Message: {result.Message}")
' Add host to blacklist
Dim result2 = Await client.AddHostAsync("malicious.com", "blacklist")
' Get all lists
Dim lists = Await client.GetAllListsAsync()
Console.WriteLine($"Total IPs: {lists.IpWhitelist.Count + lists.IpBlacklist.Count}")
Modern C# implementation with async/await support and comprehensive error handling.
using System;
using System.Threading.Tasks;
// Initialize the client
var client = new ListManagementClient("your-api-key-here");
// Add IP to whitelist
var result = await client.AddIpAddressAsync("192.168.1.100", "whitelist");
Console.WriteLine($"Success: {result.Success}, Message: {result.Message}");
// Bulk add multiple IPs
var ips = new List<string> { "10.0.0.1", "10.0.0.2", "10.0.0.3" };
var bulkResult = await client.BulkAddAsync(ips, "ip", "whitelist");
Console.WriteLine($"Added {bulkResult.SuccessCount} IPs");
Browser and Node.js compatible JavaScript examples using Fetch API.
const API_KEY = 'your-api-key-here';
const BASE_URL = 'https://sec.602.tech';
// Add IP to whitelist
async function addIpToWhitelist(ipAddress) {
const response = await fetch(`${BASE_URL}/api/listmanagement/ip/add`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
apiKey: API_KEY,
ipAddress: ipAddress,
listType: 'whitelist'
})
});
return await response.json();
}
// Usage
const result = await addIpToWhitelist('192.168.1.100');
console.log('Result:', result);
PowerShell scripts for automation and bulk management operations.
$apiKey = "your-api-key-here"
$baseUrl = "https://sec.602.tech"
# Add IP to whitelist
$body = @{
apiKey = $apiKey
ipAddress = "192.168.1.100"
listType = "whitelist"
} | ConvertTo-Json
$result = Invoke-RestMethod `
-Uri "$baseUrl/api/listmanagement/ip/add" `
-Method Post `
-ContentType "application/json" `
-Body $body
Write-Host "Success: $($result.success)"
Write-Host "Message: $($result.message)"
Command-line examples for testing and integration.
curl -X POST https://sec.602.tech/api/listmanagement/ip/add \
-H "Content-Type: application/json" \
-d '{
"apiKey": "your-api-key-here",
"ipAddress": "192.168.1.100",
"listType": "whitelist"
}'
curl -X POST https://sec.602.tech/api/listmanagement/host/add \
-H "Content-Type: application/json" \
-d '{
"apiKey": "your-api-key-here",
"host": "malicious.com",
"listType": "blacklist"
}'
curl -X GET "https://sec.602.tech/api/listmanagement/lists?apiKey=your-api-key-here"
curl -X POST https://sec.602.tech/api/listmanagement/bulk/add \
-H "Content-Type: application/json" \
-d '{
"apiKey": "your-api-key-here",
"entries": ["192.168.1.100", "192.168.1.101", "10.0.0.1"],
"entryType": "ip",
"listType": "whitelist"
}'
Sign up for a 602TechSec account and obtain your API key from the dashboard.
Download the appropriate client library or examples for your preferred language.
Use the following test command to verify your API key works:
curl -X GET "https://sec.602.tech/api/listmanagement/lists?apiKey=YOUR_API_KEY"
Follow the examples above to integrate list management into your application.
Restrict API access to only your office IP addresses for enhanced security.
See ExampleGrant and revoke temporary access for contractors or partners.
See Example