Client Credentials Grant
Authenticate server-to-server API requests
The Client Credentials Grant is the standard OAuth 2.0 flow for server-to-server API requests (RFC 6749 §4.4). This flow allows your server to authenticate directly with our API using your client credentials, without any user interaction. Here’s how it works:
Keep your client_secret
secure and never expose it in client-side code. An API key provides full access to all the
data in a project. Don’t hardcode it in code repositories and don’t share it with others.
Get your credentials
Contact support@nomos.energy to obtain your client_id
and client_secret
.
Exchange for tokens
Exchange your client credentials for access and refresh tokens by making a request from your backend server. The client_id
and client_secret
must be sent in the Authorization header as Basic authentication credentials:
The response will include an access token (valid for 60 minutes) and a refresh token:
Make authenticated requests
Include the access token in the Authorization header of your API requests:
Refresh expired tokens
When the access token expires, use the refresh token to obtain a new one: