TL;DR
POST https://auth.clever-pv.com/connect/tokenwithgrant_type=client_credentialsandscope=connect_api- Use the returned
access_tokenasAuthorization: Bearer {token}on all requests - Tokens expire — check
expires_inin the response and refresh before it runs out
Base URLs
| Purpose | URL |
|---|---|
| Auth | https://auth.clever-pv.com |
| API | https://api.clever-pv.com/connect |
Token Details
The authentication uses OAuth2 Client Credentials flow:
- Token URL:
https://auth.clever-pv.com/connect/token - Grant Type:
client_credentials - Scope:
connect_api
Tokens are automatically cached and refreshed as needed.
Example: Fetch Token with curl
curl -X POST "https://auth.clever-pv.com/connect/token"
-H "Content-Type: application/x-www-form-urlencoded"
-d "grant_type=client_credentials"
-d "client_id=CLIENT_ID"
-d "client_secret=CLIENT_SECRET"
-d "scope=connect_api"
Replace CLIENT_ID and CLIENT_SECRET with your actual credentials.
Read and write access
Write access to the Connect API is enabled per partner, not per API client:
- All API clients (
client_ids) of your partner account share the same setting, test clients included. If your partner account is set up as a sub-account of another partner, the parent partner's setting applies. - Without write access, every request other than
GET,HEADandOPTIONSreturns403witherrorCode: "writeAccessNotEnabled". Reads keep working. - Creating a user counts as a write. If your users are created through the Connect API on first use (see Automatic Creation), every request with a
{userId}in the path requires write access —GETrequests included, and also for users that already exist. - Write access is enabled by clever-PV. To have it enabled, contact support.
See Error Codes for the other access-related errors.
Last modified on