From API credentials to your first connected device in five steps. Each step links to the page with the details.
Before you start
- API credentials — a
client_idandclient_secretfor the Connect API, issued by clever-PV. Not a partner yet? Ask via Support. - Write access — needed to create users and connections. It is enabled per partner, see Read and write access.
- A registered redirect URI — only if you use Connect UI (step 3). Register it in the clever-PV Partner Portal.
All paths below are relative to the API base URL:
| Purpose | URL |
|---|---|
| Auth | https://auth.clever-pv.com |
| API | https://api.clever-pv.com/connect |
Prefer clicking through first?
The Connect API TUI runs the same flow in the browser with your credentials and shows every request and response.
Steps
-
Get an access token
Send the returned
access_tokenasAuthorization: Bearer {token}on every request and fetch a new one beforeexpires_inruns out. Details: Authentication. -
Pick a
userIdand list vendorsThe
userIdis your identifier for the end customer (min. 5 characters). There is no sign-up call: the first request with a newuserIdcreates the user and their home. Send the home's timezone on that first request.CodeThe response lists the vendors your users can connect, each with its
idand onboardingflow. Details: Users and Homes, Device Onboarding Flow. -
Connect the user's vendor account
The quickest way is the hosted Connect UI. It runs the vendor login for you:
CodeSend the user's browser to the returned
connectUrl. On success the browser comes back to yourredirectUriwith?connectionId=.... Want the vendor login inside your own UI instead? Follow the Device Onboarding Flow. -
Link a device
A connection gives access to the devices of one vendor account. List them and link the one the user picks:
CodeCodeOnly offer entries with
available: true. The response is the linked device with its clever-PVid. Details: Step 7–8 of the onboarding flow. -
Read and control the device
CodeEverything a device can do is in its
capabilities[]. Read values from there, and write a capability with aPUTon its name:CodeA write returns
202 Accepted; read the device again to see the result. Only write capabilities that the device lists. Details: Device Capabilities.