Create a client session
Says who Link acts for, and what it may reach, for 60 minutes. Call it from the one endpoint your app’s
fetchClientSecret calls and return client_secret to the SDK, or send a browser to web_url (append
&action=…&charger_id=… for an action other than add). Link opens any number of link sessions with it
until it expires, then asks your app for a new one.
Without external_user_id the client session is for your own chargers. With it, it is for one of your
users: the first client session for an external_user_id creates that user, and their first link
session shows them a consent screen with your name and logo. A Plugchoice user calling with their own
token acts for themselves.
The scope (required) is everything its link sessions may reach, so the secret can’t be used on the
rest of your fleet: the chargers to work on, the sites to add chargers to (and work on any charger at
them), one address to add chargers at (location), and whether add may make a new site at an address
the hosted flow asks your user for (new_site). Name at least one (422 scope-required), at most 100 ids
per list. Every id is checked now (404 not-found for one you may not use), so a scope can only narrow
your access; there is no “everything”. What you may name:
| Caller | Chargers and sites | location or new_site |
|---|---|---|
Integration, without external_user_id (your own chargers) | At sites your team owns | Creates a site in your team |
Integration, with external_user_id (one of your users) | At that user’s sites | Reuses the user’s site with the same reference, else creates one in your team |
| Plugchoice user | At sites they have Sensitive access to | Creates a site in their current team |
Once an add link session has made the site of location (when it starts) or a new site (when the
hosted flow has the address), later link sessions of the same client session add to that site.
The other fields are defaults for every link session: the language, the colour scheme, the brand and methods offered, and your label for the charger.
Authorizations
Headers
Body
Limit the onboarding methods offered. Default all.
How a charger gets connected:
local_hotspot: the SDK joins the charger's own Wi-Fi and configures it (Charge Amps, Enovates, go-e, Peblar, Webasto).local_lan: the SDK finds the charger on the home network, or joins its setup hotspot, signs in to it over the brand's pinned HTTPS and configures it (Alfen). The identity is read from the charger.local_ble: the SDK (or Web Bluetooth in a browser) configures the charger over Bluetooth, with the identity from its sticker (SolarEdge), or the one it has (Ratio, Teltonika, Wallbox).manual_ocpp: the user types the identity and configures the charger themselves; any OCPP charger, works in a browser.vendor_cloud: Plugchoice switches the charger over in its brand's cloud after the user signs in there with the charger owner's account (Zaptec, Easee), or after the user did it in the brand's app (Easee); works in a browser.
More may be added.
local_hotspot, local_lan, local_ble, manual_ocpp, vendor_cloud Integrations only, for a user of yours whose chargers stay in their own Plugchoice account: what the
consent screen asks for, and what your grant on each charger gets. Some of the scopes Plugchoice
allowed your integration (another one is a field error); charger:read is always included. Default:
all of them.
1What your user lets your integration do with a charger in their own account:
charger:read: status, connectors, model, firmware and settings. Always asked.sessions:read: charging sessions (times, energy and the card used).charger:control: start and stop, current limit, smart charging. One integration per charger.site:read: the site's address.
charger:read, sessions:read, charger:control, site:read Response
Created