Skip to main content
Axle works with Enode to provide access to a wide array of EVs, chargers, heat pumps, and batteries. Axle will call the Enode API directly on your behalf to read from and control assets. We provide a pre-built integration to help you gather credentials from your users, access assets, and confer the ability to control them to Axle. Enode host their own onboarding flow - LinkUI. This guide will demonstrate how to use Axle Components and LinkUI to onboard and connect an asset. If you’re developing in another platform, get in touch to discuss how we can provide a native integration.

Step 1: Render the Axle Enode component

This is a helper component, which will automatically generate and return correctly scoped Enode tokens. The end user will see a loading indicator, and you’ll need to listen to messages to correctly show the Native Enode SDK.
Example component view

Step 2: Listen for the Enode token from the component

You’ll need to listen for the Enode token once the component has authenticated and fetched from Axle. The Enode component automatically sends this token using WKWebView message handlers on iOS. We’ll first register the message handlers in the WebView. This example is using SwiftUI, but it’s also easy to do this in UIKit by implementing the WKScriptMessageHandler delegate.
Register message handler in the WebView
Adding a JS listener

Step 3: Handle the Enode token and trigger LinkSDK

Once you receive the Enode token from the Axle component, you’ll need to present the LinkSDK to complete the asset connection. First, import LinkKit and add the necessary state variables.
Import LinkKit and add state variables
Next, update your message handler to extract the link token from the response and trigger the LinkSDK:
Handle token and trigger LinkSDK
Finally, add the LinkKit sheet to your view and handle the results:
Add LinkKit sheet
Add the success and error handlers:
Handle LinkSDK results