The SDK supports two environments:
| Environment | Auth URL | API URL |
|---|---|---|
demo | demoauth.fatturazioneelettronica.aruba.it | demows.fatturazioneelettronica.aruba.it |
production | auth.fatturazioneelettronica.aruba.it | ws.fatturazioneelettronica.aruba.it |
import { ArubaClient } from '@fatturazione-elettronica-aruba/core';
// Demo environment (testing)
const demoClient = new ArubaClient({
environment: 'demo',
});
// Production environment
const prodClient = new ArubaClient({
environment: 'production',
});
const client = new ArubaClient({
environment: 'production',
timeout: 60000, // HTTP timeout (default: 30000ms)
maxRetries: 5, // Max retries for 429 errors (default: 3)
tokenStorage: {
getToken: async () => localStorage.getItem('aruba_token'),
setToken: async (token) => localStorage.setItem('aruba_token', JSON.stringify(token)),
clearToken: async () => localStorage.removeItem('aruba_token'),
},
});
| Operation | Limit |
|---|---|
| Authentication | 1 req/min per IP |
| Invoice upload | 30 req/min per IP |
| Invoice search | 12 req/min per IP |
The SDK automatically handles 429 errors with retry and exponential backoff.
Maximum upload size: 5 MB