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.
Goal: Authenticate, obtain an ID token, and make your first VBAPI request.
Prerequisite:
Your VBA contact will provide:
x-api-keyvbasoftware-client-idvbasoftware-client-codevbasoftware-database- A username/password for authentication
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.
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...Now call any VBAPI endpoint using your Bearer token.
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 now have:
- Valid authentication
- A working Bearer token
- Your first API call completed