πŸ› οΈ Official SDKs

Complete collection of official SolveForce SDKs for Python, JavaScript, Go, and other languages, designed to accelerate your integration and development.


🎯 Available SDKs

Production-Ready SDKs

LanguageStatusVersionDocumentation
Pythonβœ… Stablev2.1.0Python Docs
JavaScript/Node.jsβœ… Stablev2.0.5JS Docs
Goβœ… Stablev1.8.2Go Docs
PHPβœ… Stablev1.9.1PHP Docs
Javaβœ… Stablev1.7.3Java Docs
C#/.NETβœ… Stablev1.6.0.NET Docs

Beta SDKs

LanguageStatusVersionNotes
RubyπŸ§ͺ Betav0.9.0Feature complete, testing phase
RustπŸ§ͺ Betav0.8.5High performance, async support
SwiftπŸ§ͺ Betav0.7.2iOS/macOS applications

🐍 Python SDK

Installation

pip install solveforce

Quick Start

from solveforce import SolveForceAPI

# Initialize client
client = SolveForceAPI(api_key="your_api_key_here")

# Get account information
account = client.accounts.get("acc_123456")

# List services
services = client.services.list(account_id="acc_123456")

# Create a new service
voice_service = client.voice.create({
    "type": "business_phone",
    "plan": "enterprise",
    "numbers": ["+1234567890"]
})

# Check fiber availability
availability = client.connectivity.check_fiber_availability({
    "address": "123 Business St, Enterprise City, TX 75001"
})

Advanced Features

# Async support
import asyncio
from solveforce.async_client import AsyncSolveForceAPI

async def main():
    async with AsyncSolveForceAPI(api_key="your_key") as client:
        accounts = await client.accounts.list()
        for account in accounts:
            services = await client.services.list(account_id=account.id)
            print(f"Account {account.name}: {len(services)} services")

# Rate limiting and retries
client = SolveForceAPI(
    api_key="your_key",
    auto_retry=True,
    max_retries=3,
    respect_rate_limits=True,
    timeout=30
)

# Webhook verification
from solveforce.webhooks import verify_webhook

def handle_webhook(request):
    payload = request.body
    signature = request.headers['X-SolveForce-Signature']
    
    if verify_webhook(payload, signature, webhook_secret):
        # Process webhook
        data = json.loads(payload)
        handle_service_update(data)

🟨 JavaScript/Node.js SDK

Installation

npm install @solveforce/api
# or
yarn add @solveforce/api

Quick Start

const SolveForce = require('@solveforce/api');

// Initialize client
const client = new SolveForce({
  apiKey: 'your_api_key_here'
});

// Get account information
const account = await client.accounts.get('acc_123456');

// List services with pagination
const services = await client.services.list({
  accountId: 'acc_123456',
  limit: 50,
  offset: 0
});

// Create cloud infrastructure
const infrastructure = await client.cloud.createInfrastructure({
  type: 'vm',
  size: 'large',
  region: 'us-east',
  image: 'ubuntu-20.04'
});

Browser Usage

<!DOCTYPE html>
<html>
<head>
    <script src="https://cdn.solveforce.com/sdk/v2/solveforce.min.js"></script>
</head>
<body>
    <script>
        const client = new SolveForce({
            apiKey: 'pk_live_your_public_key',
            environment: 'production'
        });

        // Check service availability
        client.connectivity.checkAvailability({
            zip: '75001',
            serviceType: 'fiber'
        }).then(availability => {
            console.log('Fiber available:', availability.available);
        });
    </script>
</body>
</html>

TypeScript Support

import { SolveForceAPI, Account, Service } from '@solveforce/api';

const client = new SolveForceAPI({
  apiKey: process.env.SOLVEFORCE_API_KEY!
});

// Type-safe API calls
const account: Account = await client.accounts.get('acc_123456');
const services: Service[] = await client.services.list({
  accountId: account.id
});

🐹 Go SDK

Installation

go get github.com/solveforce/solveforce-go

Quick Start

package main

import (
    "context"
    "fmt"
    "log"
    
    "github.com/solveforce/solveforce-go"
)

func main() {
    client := solveforce.NewClient("your_api_key_here")
    
    // Get account
    account, err := client.Accounts.Get(context.Background(), "acc_123456")
    if err != nil {
        log.Fatal(err)
    }
    
    fmt.Printf("Account: %s\n", account.Name)
    
    // List services
    services, err := client.Services.List(context.Background(), &solveforce.ServiceListOptions{
        AccountID: account.ID,
        Limit:     50,
    })
    if err != nil {
        log.Fatal(err)
    }
    
    fmt.Printf("Found %d services\n", len(services))
}

Concurrent Operations

// Concurrent API calls
func processAccounts(client *solveforce.Client, accountIDs []string) {
    var wg sync.WaitGroup
    results := make(chan *solveforce.Account, len(accountIDs))
    
    for _, id := range accountIDs {
        wg.Add(1)
        go func(accountID string) {
            defer wg.Done()
            account, err := client.Accounts.Get(context.Background(), accountID)
            if err != nil {
                log.Printf("Error getting account %s: %v", accountID, err)
                return
            }
            results <- account
        }(id)
    }
    
    wg.Wait()
    close(results)
    
    for account := range results {
        fmt.Printf("Processed account: %s\n", account.Name)
    }
}

🐘 PHP SDK

Installation

composer require solveforce/solveforce-php

Quick Start

<?php
require_once 'vendor/autoload.php';

use SolveForce\SolveForceAPI;

$client = new SolveForceAPI('your_api_key_here');

// Get account
$account = $client->accounts->get('acc_123456');

// List invoices
$invoices = $client->billing->getInvoices([
    'account_id' => $account->id,
    'status' => 'pending',
    'limit' => 25
]);

foreach ($invoices as $invoice) {
    echo "Invoice {$invoice->number}: ${$invoice->amount}\n";
}

// Create support ticket
$ticket = $client->support->createTicket([
    'subject' => 'Network connectivity issue',
    'description' => 'Experiencing intermittent connectivity issues',
    'priority' => 'high',
    'account_id' => $account->id
]);

echo "Created ticket #{$ticket->id}\n";
?>

Laravel Integration

// config/services.php
'solveforce' => [
    'api_key' => env('SOLVEFORCE_API_KEY'),
    'environment' => env('SOLVEFORCE_ENV', 'production'),
],

// Service Provider
use SolveForce\SolveForceAPI;

class AppServiceProvider extends ServiceProvider 
{
    public function register()
    {
        $this->app->singleton(SolveForceAPI::class, function ($app) {
            return new SolveForceAPI(config('services.solveforce.api_key'));
        });
    }
}

// Controller usage
class TelecomController extends Controller
{
    public function __construct(private SolveForceAPI $solveforce) {}
    
    public function checkAvailability(Request $request)
    {
        $availability = $this->solveforce->connectivity->checkFiberAvailability([
            'address' => $request->input('address')
        ]);
        
        return response()->json($availability);
    }
}

β˜• Java SDK

Installation

<dependency>
    <groupId>com.solveforce</groupId>
    <artifactId>solveforce-java</artifactId>
    <version>1.7.3</version>
</dependency>

Quick Start

import com.solveforce.SolveForceAPI;
import com.solveforce.models.*;

public class SolveForceExample {
    public static void main(String[] args) {
        SolveForceAPI client = new SolveForceAPI("your_api_key_here");
        
        // Get account
        Account account = client.accounts().get("acc_123456");
        System.out.println("Account: " + account.getName());
        
        // List services
        ServiceList services = client.services().list(
            ServiceListRequest.builder()
                .accountId(account.getId())
                .limit(50)
                .build()
        );
        
        services.getData().forEach(service -> {
            System.out.println("Service: " + service.getName());
        });
        
        // Create AI automation
        AIAutomation automation = client.ai().createAutomation(
            CreateAIAutomationRequest.builder()
                .name("Network Optimization")
                .type("network_optimization")
                .triggers(List.of("high_latency", "packet_loss"))
                .build()
        );
    }
}

Spring Boot Integration

@Configuration
public class SolveForceConfig {
    
    @Bean
    @ConfigurationProperties(prefix = "solveforce")
    public SolveForceAPI solveForceClient() {
        return new SolveForceAPI(apiKey);
    }
}

@RestController
public class TelecomController {
    
    @Autowired
    private SolveForceAPI solveForce;
    
    @GetMapping("/availability")
    public ResponseEntity<AvailabilityResponse> checkAvailability(
            @RequestParam String address) {
        
        AvailabilityResponse availability = solveForce.connectivity()
            .checkFiberAvailability(address);
            
        return ResponseEntity.ok(availability);
    }
}

πŸ”· C#/.NET SDK

Installation

dotnet add package SolveForce.NET

Quick Start

using SolveForce;
using SolveForce.Models;

var client = new SolveForceClient("your_api_key_here");

// Get account
var account = await client.Accounts.GetAsync("acc_123456");
Console.WriteLine($"Account: {account.Name}");

// List services
var services = await client.Services.ListAsync(new ServiceListRequest
{
    AccountId = account.Id,
    Limit = 50
});

foreach (var service in services.Data)
{
    Console.WriteLine($"Service: {service.Name} - Status: {service.Status}");
}

// Create security service
var securityService = await client.Security.CreateServiceAsync(new CreateSecurityServiceRequest
{
    Type = SecurityServiceType.ManagedFirewall,
    AccountId = account.Id,
    Configuration = new FirewallConfiguration
    {
        Rules = new[]
        {
            new FirewallRule { Action = "allow", Port = 443, Protocol = "tcp" }
        }
    }
});

ASP.NET Core Integration

// Startup.cs
public void ConfigureServices(IServiceCollection services)
{
    services.AddSingleton<ISolveForceClient>(provider =>
        new SolveForceClient(Configuration["SolveForce:ApiKey"]));
}

// Controller
[ApiController]
[Route("api/[controller]")]
public class TelecomController : ControllerBase
{
    private readonly ISolveForceClient _solveForce;
    
    public TelecomController(ISolveForceClient solveForce)
    {
        _solveForce = solveForce;
    }
    
    [HttpGet("availability")]
    public async Task<IActionResult> CheckAvailability([FromQuery] string address)
    {
        var availability = await _solveForce.Connectivity
            .CheckFiberAvailabilityAsync(address);
            
        return Ok(availability);
    }
}

πŸ”§ SDK Features Comparison

FeaturePythonJavaScriptGoPHPJavaC#
Async Supportβœ…βœ…βœ…βŒβœ…βœ…
Type SafetyπŸŸ‘βœ…βœ…βŒβœ…βœ…
Auto Retryβœ…βœ…βœ…βœ…βœ…βœ…
Rate Limitingβœ…βœ…βœ…βœ…βœ…βœ…
Webhook Utilsβœ…βœ…βœ…βœ…βœ…βœ…
Paginationβœ…βœ…βœ…βœ…βœ…βœ…
Error Handlingβœ…βœ…βœ…βœ…βœ…βœ…

🎯 Common Patterns

Error Handling

# Python
try:
    service = client.services.get("svc_123")
except SolveForceError as e:
    if e.status_code == 404:
        print("Service not found")
    else:
        print(f"API Error: {e.message}")

// JavaScript
try {
    const service = await client.services.get('svc_123');
} catch (error) {
    if (error.statusCode === 404) {
        console.log('Service not found');
    } else {
        console.log(`API Error: ${error.message}`);
    }
}

Pagination

# Python - Auto-pagination
for service in client.services.list_all(account_id="acc_123"):
    print(service.name)

# Manual pagination
services = client.services.list(account_id="acc_123", limit=50)
while services.has_more:
    # Process current page
    for service in services.data:
        print(service.name)
    
    # Get next page
    services = client.services.list(
        account_id="acc_123",
        limit=50,
        offset=services.next_offset
    )

Webhooks

# Python webhook handling
from solveforce.webhooks import verify_signature

@app.route('/webhooks/solveforce', methods=['POST'])
def handle_webhook():
    payload = request.get_data()
    signature = request.headers.get('X-SolveForce-Signature')
    
    if not verify_signature(payload, signature, webhook_secret):
        return 'Invalid signature', 400
    
    event = json.loads(payload)
    
    if event['type'] == 'service.provisioned':
        handle_service_provisioned(event['data'])
    
    return 'OK'

πŸš€ Getting Started

1. Choose Your SDK

Select the SDK for your preferred programming language from the table above.

2. Get API Credentials

  1. Sign up at portal.solveforce.com
  2. Generate API keys in your dashboard
  3. Choose between development and production environments

3. Install and Configure

Follow the installation instructions for your chosen SDK and configure with your API key.

4. Start Building

Use our comprehensive examples and documentation to build your integration.


πŸ“š Additional Resources

Documentation

  • API Reference: Complete endpoint documentation
  • SDK Guides: Language-specific tutorials and examples
  • Best Practices: Optimization and security guidelines
  • Migration Guides: Upgrading between SDK versions

Support

  • GitHub Repositories: Source code and issue tracking for each SDK
  • Community Forums: Developer discussions and Q&A
  • Stack Overflow: Tagged questions with solveforce-api
  • Email Support: sdk-support@solveforce.com

Tools

  • API Explorer: Interactive API testing tool
  • Postman Collection: Complete API collection for testing
  • CLI Tool: Command-line interface for common operations
  • Monitoring Dashboard: Track API usage and performance

Ready to start building with SolveForce? Choose your SDK and contact us at (888) 765-8301 for implementation support and developer resources.

Build faster, integrate easier, scale seamlessly with SolveForce official SDKs.