Svashasan OS API Documentation – API Key Authentication Guide
Welcome to the official API documentation for Svashasan OS — the electric vehicle operating system built for connected mobility, autonomy, and developer innovation.
This guide will help you:
- Understand how to request and use an API key.
- Authenticate securely.
- Explore best practices and troubleshooting tips.
What is an API Key?
An API key is a unique identifier used to authenticate your app or device with the Svashasan API Gateway. Every request made to a protected endpoint must include your API key.
Getting Your API Key
To request your API key, follow these steps:
- Fill the form on /developer.html or email us at contact@svashasan.shop.
- Our team will review and verify your details.
- You’ll receive an API key via email. Example:
svasha_live_d8ae1f9a2c1e4b649a2f5a0e12345678
**Note:** Treat your API key like a password. Keep it secret and don’t expose it in public code repositories.
Making Authenticated Requests
All authenticated requests must include your API key in the request header:
Authorization: Bearer YOUR_API_KEY
Example using curl
:
curl -H "Authorization: Bearer svasha_live_d8ae1f9a2c1e4b649a2f5a0e12345678" \
https://api.svashasan.shop/telemetry
Sample API Usage
Endpoint: /telemetry
Returns live vehicle metrics.
Request:
GET https://api.svashasan.shop/telemetry
Authorization: Bearer YOUR_API_KEY
Response:
{
"speed": 35,
"range": 348.5,
"battery": 72.3,
"navigation": "Take right in 500m · 1 min"
}
Field | Type | Description |
---|---|---|
speed | number | Current speed in kmph |
range | number | Estimated distance remaining (km) |
battery | number | Remaining battery in kWh |
navigation | string | Voice-assisted navigation prompt |
Test API Key (Sandbox Mode)
You can use our test key for sandbox access:
svasha_test_demoKey_0000000000
Use this in your headers for safe, limited testing. It returns simulated data.
Rate Limits
Plan Type | Requests per Minute | Requests per Day |
---|---|---|
Free Developer | 60 | 10,000 |
Paid Partner | 600 | 100,000 |
Exceeding the rate limit returns:
{
"error": "Rate limit exceeded. Please try again later."
}
Security & Best Practices
- Never expose your API key in frontend (HTML/JS).
- Rotate keys regularly for security.
- Use environment variables to store your keys in production apps.
- Always use HTTPS to prevent sniffing.
Key Rotation
To regenerate or revoke your key:
- Visit your Developer Dashboard (coming soon).
- Or email us at contact@svashasan.shop.
FAQ
-
Q: Is authentication required for all endpoints?
A: Yes. All
/telemetry
,/analytics
, and/vehicle-control
routes require an API key. -
Q: Can I use one key for multiple vehicles?
A: Yes. You can associate one key with multiple devices, but usage limits apply globally.
-
Q: What if my key is compromised?
A: Revoke it immediately from your dashboard or by emailing our support team.
-
Q: Do you support OAuth or token expiry?
A: Currently, we use static API keys. OAuth2 support is under development.
Support
Coming Soon
- WebSocket support for real-time streaming.
- Developer dashboard & analytics.
- GitHub SDK integrations (Node.js, Python, Flutter).