Skip to main content

Developer SDK/API Overview

1. SaaSus SDK / API Capabilities and Use Cases

DomainPrimary Use Case
Auth APIObtain ID/access tokens, manage users/tenants, configure roles/attributes
Billing APIConfigure Stripe integration
Pricing APIManage rate plans, tax rates, and metering definitions
Communication APISubmit and retrieve user feedback
Apilog APIRetrieve API call logs
Awsmarketplace APIConfigure AWS Marketplace integration
Integration APIConfigure Amazon EventBridge integration
ApiGateway APIConfigure the Smart API Gateway

2. How to Retrieve and Use Authentication Information

All SaaSus API requests require the SAASUSSIGV1 signature header.
Use the following flow to generate the signature and obtain the id_token.

2.1 Generating the SAASUSSIGV1 Signature Header

The signature algorithm is explained in detail in the Getting Started guide.
Below is the basic header format:

Authorization: SAASUSSIGV1 Sig=<signature>, SaaSID=<SaaS ID>, APIKey=<API Key>

When Using the SDK

  • The SDK automatically adds the signature header before sending requests.
  • You do not need to manually implement code to generate Sig.

2.2 Obtaining and Using an ID Token (id_token)

  1. Send a signed request to GET /v1/auth/credentials to retrieve the id_token, client_id, and client_secret.
  2. The id_token is in JWT format and should be stored in browser localStorage or similar.
  3. Pass the id_token as a parameter in user-related API calls like GET /v1/auth/user-info.
# 1) Retrieve id_token using a temporary code
TEMP_CODE="69e732d6-8ecc-45c4-c2eb-8438f7ffe775"
curl https://api.saasus.io/v1/auth/credentials?code=${TEMP_CODE} \
-H "Authorization: SAASUSSIGV1 Sig=..., SaaSID=..., APIKey=..."
info

The temporary code code is included as a query parameter during login redirection.

See the SDK example in
Implementing JWT Retrieval API

# 2) Use id_token to retrieve user info
curl https://api.saasus.io/v1/auth/userinfo?id_token=<ID_TOKEN> \
-H "Authorization: SAASUSSIGV1 Sig=..., SaaSID=..., APIKey=..."

See the SDK example in
User Info Retrieval API Example

Use CaseAPI ReferenceTutorial Link
Create TenantAuth API – CreateTenantCreating a Tenant
Create UserAuth API – CreateSaasUserImplementation: Creating Users in SaaS App
Metering-relatedPricing API – metering tag listMetering API Sample & Usage (Laravel)

4. SDK List

LanguageSDK Repository Link
PythonPython SDK GitHub
JavaScriptJavaScript SDK GitHub
GoGo SDK GitHub
JavaJava SDK GitHub
PHPPHP SDK GitHub
C#C# SDK GitHub