API Keys
S4Kit uses API keys for authentication, similar to services like Stripe. API keys provide a secure way to authenticate your application without exposing SAP credentials.Key Format
API keys follow this format:Using Your API Key
Pass your API key when creating the client:Environment Variables
Store your API key securely using environment variables:Node.js
Bun
Bun automatically loads.env files:
API Key Permissions
Each API key can have granular permissions that control:- Which instances the key can access (sandbox, dev, production, etc.)
- Which entities the key can read/write
- Which operations are allowed (list, get, create, update, delete)
Example Permission Configuration
In the S4Kit dashboard, you can configure:| Entity | List | Get | Create | Update | Delete |
|---|---|---|---|---|---|
| A_BusinessPartner | ✓ | ✓ | ✗ | ✗ | ✗ |
| A_SalesOrder | ✓ | ✓ | ✓ | ✓ | ✗ |
| A_Product | ✓ | ✓ | ✓ | ✓ | ✓ |
403 Forbidden error.
Rate Limiting
API keys have rate limits to protect against abuse:| Limit Type | Default |
|---|---|
| Per minute | 60 requests |
| Per day | 10,000 requests |
429 Too Many Requests response with a Retry-After header.
Key Management
Creating Keys
Create API keys in the S4Kit Dashboard:- Navigate to API Keys
- Click Create New Key
- Configure permissions and rate limits
- Copy the key (it won’t be shown again)
Rotating Keys
To rotate a key without downtime:- Create a new key with the same permissions
- Update your application to use the new key
- Verify the new key works in production
- Revoke the old key
Revoking Keys
If a key is compromised:- Go to API Keys in the dashboard
- Find the compromised key
- Click Revoke