Skip to main content
Link is a set of screens that guides your user through connecting their charger. Three parties work together to show it: your app, your server and Plugchoice. This page walks through one charger being added, and the ideas you meet along the way.

One charger, start to finish

1

Your user taps Connect charger

Your app opens Link for an action: what your user wants to do. Here that’s add, to add a charger.
2

The SDK asks your server for a client secret

The SDK calls your app’s callback, which asks your server. Your server asks Plugchoice for a client session for this user, and passes its secret back. Your own API credentials never leave your server.
3

Your user agrees to share their charger

The first time, Link asks your user to agree to the scopes you ask for, such as seeing their charging sessions or controlling their charger. It asks again only when you ask for more. See Consent and branding.
4

Link sets up the charger

Your user picks their charger’s brand and follows the steps for it. Link does the technical work, such as joining the charger’s own Wi-Fi or talking to it over Bluetooth, and shows its progress as a checklist.
5

Your user signs in to Plugchoice

The charger goes to your user’s own Plugchoice account, and you get access to it with the scopes they agreed to. Your user signs in, or creates an account, with a code by email, Google or Apple, and picks the site it goes to. When Plugchoice set your integration up so the chargers go to your team, there’s no sign-in.
6

Your user checks what's saved

Link shows what it saves with the charger: the settings it read or asked for, the cards and charging history it found on the charger, and the operator it keeps. When the charger had no other operator, Link first asks whether your user uses one, such as a platform that bills charging sessions to an employer.
7

Link closes and tells your app

Your app gets the result: whether it worked, and which chargers were added. Your server confirms it with Plugchoice, and the charger is ready to use in your app.

The ideas behind it

Actions: what your user wants to do

Your app opens Link for one action at a time:Everything except add is about one charger, so you pass its id. Actions
A client session is like a visitor’s pass. Your server creates one for the signed-in user, and it says which chargers and sites that user may touch: its scope. It’s valid for an hour.Its client secret is what your app hands to the SDK. Because the scope is in the client session, a secret can’t reach the rest of your chargers, even if someone copies it. Client sessions
Not every charger supports every action. Each charger in the SDK API lists its capabilities: whether Link can set it up, reconnect it and change its network, and what the phone needs for it, such as Bluetooth.Show a button only when the charger supports the action and the phone can do it. Capabilities
You get test credentials first. Test mode works with real chargers, so you can try everything with your own. When your integration works, Plugchoice switches it to live. Test and live

Who does what

Next

Get started

Build the three pieces and add a charger, end to end.

Installation

Add the SDK to your iOS, Android or React Native app.