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 whether you may see and control their chargers. This happens once per user.
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

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 change its Wi-Fi, set it up or reconnect it, 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.