Coming Soon! This platform is currently in development. Contact security@602.tech for more information.
602TechSec Active

Code Examples & Integration

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.

VB.NET Examples

Complete VB.NET client library with helper methods for all API operations.

Quick Example
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}")

C# Examples

Modern C# implementation with async/await support and comprehensive error handling.

Quick Example
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");

JavaScript Examples

Browser and Node.js compatible JavaScript examples using Fetch API.

Quick Example
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

PowerShell scripts for automation and bulk management operations.

Quick Example
$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)"

cURL Examples

Command-line examples for testing and integration.

Add IP to Whitelist
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"
  }'
Add Host to Blacklist
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"
  }'
Get All Lists
curl -X GET "https://sec.602.tech/api/listmanagement/lists?apiKey=your-api-key-here"
Bulk Add IPs
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"
  }'

Quick Start Guide

Step 1: Get Your API Key

Sign up for a 602TechSec account and obtain your API key from the dashboard.

Step 2: Choose Your Language

Download the appropriate client library or examples for your preferred language.

Step 3: Test the API

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"
Step 4: Integrate Into Your Application

Follow the examples above to integrate list management into your application.

Need Help? Check out our full API documentation or try the API Explorer.

Common Use Cases

Office IP Whitelist

Restrict API access to only your office IP addresses for enhanced security.

See Example
Block Malicious Domains

Prevent requests from known malicious or spam domains.

See Example

Temporary Contractor Access

Grant and revoke temporary access for contractors or partners.

See Example
Audit & Reporting

Regularly audit your whitelists and blacklists for compliance.

See Example