Developer SDK/API Overview
1. SaaSus SDK / API Capabilities and Use Cases
Domain | Primary Use Case |
---|---|
Auth API | Obtain ID/access tokens, manage users/tenants, configure roles/attributes |
Billing API | Configure Stripe integration |
Pricing API | Manage rate plans, tax rates, and metering definitions |
Communication API | Submit and retrieve user feedback |
Apilog API | Retrieve API call logs |
Awsmarketplace API | Configure AWS Marketplace integration |
Integration API | Configure Amazon EventBridge integration |
ApiGateway API | Configure 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
)
- Send a signed request to
GET /v1/auth/credentials
to retrieve theid_token
,client_id
, andclient_secret
. - The
id_token
is in JWT format and should be stored in browserlocalStorage
or similar. - Pass the
id_token
as a parameter in user-related API calls likeGET /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
3. Use Case Reference Links
Use Case | API Reference | Tutorial Link |
---|---|---|
Create Tenant | Auth API – CreateTenant | Creating a Tenant |
Create User | Auth API – CreateSaasUser | Implementation: Creating Users in SaaS App |
Metering-related | Pricing API – metering tag list | Metering API Sample & Usage (Laravel) |
4. SDK List
Language | SDK Repository Link |
---|---|
Python | Python SDK GitHub |
JavaScript | JavaScript SDK GitHub |
Go | Go SDK GitHub |
Java | Java SDK GitHub |
PHP | PHP SDK GitHub |
C# | C# SDK GitHub |