Skip to content

Getting Started

Experience powerful API integration with VBASoftware’s REST API platform — now enhanced with AI-ready documentation and MCP support.

This quick tutorial gets you from credentials → first successful request in just a few minutes.

🎯 5-Minute Tutorial

Goal: Authenticate, obtain an ID token, and make your first VBAPI request.

Prerequisite:
Your VBA contact will provide:

  • x-api-key
  • vbasoftware-client-id
  • vbasoftware-client-code
  • vbasoftware-database
  • A username/password for authentication

Step 1 — Authenticate & Get an ID Token

VBAPI uses token-backed authentication.
The first call exchanges your credentials for a JWT ID Token, which is then sent as a Bearer token in all subsequent calls.

🔑 Python Example — Get ID Token

import requests
import base64

def get_id_token(username, password):
    url = "https://vbapi.vbasoftware.com/vbasoftware/user-authentication"

    # Encode credentials: "username:password"
    raw = f"{username}:{password}"
    encoded = base64.b64encode(raw.encode()).decode()

    headers = {
        "x-api-key": "YOUR_API_KEY",
        "Authorization": f"Basic {encoded}",
        "vbasoftware-client-id": "YOUR_CLIENT_ID",
        "vbasoftware-client-code": "YOUR_CLIENT_CODE",
        "vbasoftware-database": "YOUR_DATABASE"
    }

    response = requests.post(url, headers=headers)
    response.raise_for_status()

    data = response.json()
    return data["data"]["authenticationResult"]["idToken"]

If successful, you’ll receive a standard Cognito JWT:

eyJraWQiOiJxT0J6eGJ...

Step 2 — Make an Authenticated API Request

Now call any VBAPI endpoint using your Bearer token.

📘 Python Example — First API Call

This example retrieves the current user profile.

def get_current_user(id_token):
    url = "https://vbapi.vbasoftware.com/vbasoftware/users/me"

    headers = {
        "x-api-key": "YOUR_API_KEY",
        "Authorization": f"Bearer {id_token}",
        "vbasoftware-database": "YOUR_DATABASE"
    }

    response = requests.get(url, headers=headers)
    response.raise_for_status()
    return response.json()

Expected Output

{
  "data": {
    "userId": 12345,
    "username": "jsmith",
    "roles": ["Administrator", "Claims"],
    "status": "Active"
  }
}

You're Ready to Build

You now have:

  • Valid authentication
  • A working Bearer token
  • Your first API call completed