Authorization Guide
Getting Started
Obtaining an API Key
VBASoftware APIs support both test and live environments. The API key used determines whether requests run in test mode or production.
API keys provide privileged access—keep them secure. Never expose them in public repositories, client-side code, or shared environments.
To request an API key, contact your Account Executive.
Acquiring an API Client
VBASoftware APIs follow the OpenAPI 3.0 specification, allowing you to generate client libraries in over 50 programming languages.
Option 1: Use Our Prebuilt JavaScript Client
For JavaScript/TypeScript users, install the prebuilt npm package:
npm install @vbasoftware/vbapi-vbasoftware-typescript-axios
Option 2: Generate Your Own Client
You can generate a client using the OpenAPI Generator.
-
Download the OpenAPI Spec
:
VBASoftware Swagger YAML -
Install OpenAPI Generator
:
Follow instructions at: Installation Guide - Generate the Client (example for Python):
openapi-generator-cli generate \
-i vbasoftware.api.yaml \
-g python \
-o vbapi-client-python
Replace -g python
with your desired language (e.g., java, php, csharp).
Authentication & API Access
Logging Into the API
All API requests require a valid VBASoftware user account. You may create a user using the Create User API or request help from a VBA administrator.
Authenticate User (C#)
private string Get_Id_Token()
{
var client = new RestClient("https://vbapi.vbasoftware.com/vbasoftware/");
var request = new RestRequest("/user-authentication", Method.POST);
request.AddHeader("x-api-key", {your_api_key});
request.AddHeader("Authorization", $"Basic {base64_encoded_username_and_password}");
request.AddHeader("vbasoftware-client-id", {your_client_id});
request.AddHeader("vbasoftware-client-code", {your_client_code});
request.AddHeader("vbasoftware-database", {your_database});
var response = client.Execute(request);
var json = JObject.Parse(response.Content);
return json["data"]["authenticationResult"]["idToken"].ToString();
}
Making an Authenticated Request
Use the retrieved id-token
as a Bearer token in all subsequent API requests.
Retrieve a Benefit (C#)
string idToken = Get_Id_Token();
var request = new RestRequest("/benefits/{Benefit_Code}", Method.GET);
request.AddHeader("x-api-key", {your_api_key});
request.AddHeader("Authorization", $"Bearer {idToken}");
request.AddHeader("vbasoftware-database", {your_database});
var response = httpClient.Execute(request);
var data = JObject.Parse(response.Content)["data"];
BenefitCodes benefit = data.ToObject<BenefitCodes>();
For more information on response formats, refer to the Response Handling Documentation.
By following this guide, you can securely authenticate and integrate with VBASoftware APIs using best practices.