Required Credentials
All Scalekit SDKs require three configuration values:| Parameter | Description | Example |
|---|---|---|
| Environment URL | Your Scalekit environment endpoint | https://your-env.scalekit.com |
| Client ID | Your application’s client identifier | skc_12345678901234567 |
| Client Secret | Your application’s secret key | test_sk_abc123... |
Get Your Credentials
Retrieve your credentials from the Scalekit dashboard:- Log in to Scalekit Dashboard
- Navigate to Dashboard > Developers > API Configuration
- Copy your Environment URL, Client ID, and Client Secret
Environment Variables
Store credentials in environment variables:.env
.env to your .gitignore:
.gitignore
SDK Initialization
Initialize the SDK with your credentials:Framework-Specific Configuration
Node.js with Express
Load environment variables with dotenv:server.js
Python with Flask
Load environment variables with python-dotenv:app.py
Go with Gin
Load environment variables with godotenv:main.go
Java with Spring Boot
Configure inapplication.properties:
application.properties
ScalekitConfig.java
Expo (React Native)
Expo uses public configuration only (no client secret):.env
utils/scalekit.js
Configuration Validation
Validate configuration on startup:Multiple Environments
Manage different configurations for development, staging, and production:Using Environment Files
.env.development
.env.production
Load Based on Environment
Node.js:Redirect URI Configuration
Configure redirect URIs in the Scalekit dashboard:- Navigate to Dashboard > Developers > API Configuration
- Add your redirect URIs:
- Development:
http://localhost:3000/auth/callback - Staging:
https://staging.yourapp.com/auth/callback - Production:
https://yourapp.com/auth/callback - Mobile:
myapp://auth/callback
- Development:
Security Best Practices
Rotate Credentials Regularly
Rotate client secrets periodically:- Generate new client secret in dashboard
- Update environment variables
- Deploy updated configuration
- Delete old client secret
Use Separate Credentials per Environment
Never reuse credentials across environments:- Development environment: Use test credentials
- Staging environment: Use staging credentials
- Production environment: Use production credentials
Protect Environment Files
Restrict access to environment files:Use Secret Management Services
For production, use secret management services:- AWS Secrets Manager
- Google Cloud Secret Manager
- Azure Key Vault
- HashiCorp Vault
Troubleshooting
Invalid Environment URL
Ensure URL format is correct:- ✅ Correct:
https://your-env.scalekit.com - ❌ Wrong:
your-env.scalekit.com(missing https://) - ❌ Wrong:
https://your-env.scalekit.com/(trailing slash)
Invalid Client Credentials
Verify credentials match your dashboard:- Check Client ID starts with
skc_ - Check Client Secret starts with
test_sk_(development) orprod_sk_(production) - Ensure no extra whitespace in environment variables