Skip to main content

Novasense Portal API

The Novasense Portal API provides programmatic access to your solar asset data, performance metrics, and analytics. This RESTful API uses OAuth 2.0 authentication and returns JSON responses.

OpenAPI Documentation​

Complete API reference with all available endpoints, request/response schemas, and interactive testing:

https://api.portal.novasense.ch/v2/docs

Getting Started​

Request API Access​

API access credentials are not self-service. To get started:

  1. Contact Novasense Support at info@novasense.ch
  2. Request API access credentials (Client ID and Client Secret)
  3. Receive your credentials securely from the support team

Authentication​

The API uses OAuth 2.0 Client Credentials flow for authentication. You'll need to obtain an access token before making API requests.

Obtaining an Access Token​

Token Endpoint:

POST https://auth.portal.novasense.ch/realms/novasense/protocol/openid-connect/token

Request Headers:

Content-Type: application/x-www-form-urlencoded

Request Body:

grant_type=client_credentials
client_id=YOUR_CLIENT_ID
client_secret=YOUR_CLIENT_SECRET

Example using cURL:

curl -X POST https://auth.portal.novasense.ch/realms/novasense/protocol/openid-connect/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials" \
-d "client_id=YOUR_CLIENT_ID" \
-d "client_secret=YOUR_CLIENT_SECRET"

Example Response:

{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"expires_in": 300,
"refresh_expires_in":0,
"token_type": "Bearer",
"not-before-policy": 0,
"scope": "api-external-audience profile email"
}

Using the Access Token​

Include the access token in the Authorization header of your API requests:

Authorization: Bearer YOUR_ACCESS_TOKEN

Example API Request:

curl -X GET https://api.portal.novasense.ch/v2/YOUR_ENDPOINT \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Token Management​

Token Validity​

  • Access tokens are valid for 5 minutes (expires_in: 300 seconds)
  • No refresh tokens are provided
  • You must request a new access token when the current one expires

Best Practices​

  1. Cache tokens and reuse them until they expire
  2. Request a new token before the current one expires (e.g., 30 seconds before)
  3. Minimize authentication requests to reduce unnecessary overhead

Usage Policy and Rate Limiting​

The Novasense Portal API is designed for moderate, programmatic usage.

Important Notes​

  • API usage may be restricted based on request volume and patterns
  • Rate limits are applied to ensure fair usage and system stability
  • Specific rate limits and usage policies are not publicly documented

Guidelines​

To ensure continued API access:

  1. Cache responses where appropriate to reduce redundant requests
  2. Implement exponential backoff for retries on errors
  3. Avoid polling at high frequencies
  4. Contact Novasense Support to discuss your specific use case and expected usage patterns

Need Higher Limits?​

If your use case requires higher API throughput or specific SLAs, please contact info@novasense.ch to discuss custom arrangements.

Support​

For questions, issues, or feature requests related to the API: