The Glow SDK is delivered as an embedded iframe, slotting into your existing web page's UI without a separate redirect or standalone page. The energy consumer completes verification inline, within the onboarding journey you already provide through your own front end.The steps to implement the Glow SDK into your onboarding journey are:Each step is explained in detail below.Implementation Guide#
The SDK should sit as a gate in front of your existing consent step — the energy consumer can't proceed to grant consent until they've completed verification and a verifiable credential has been issued.Prerequisites#
To use the Glow SDK, you must be working on behalf of an organisation with an active contract signed with Glow, and signed up to the Glow Data Service.Your application ID. Found in the Glow Developer Portal.
A publicGlowIdvClientKey.
A subject for the Verifiable Credential for each energy consumer. This can be a unique reference or an email address for that energy consumer.
A page where you can add a <script> tag and a container element.
Where you add the Glow SDK depends on your existing onboarding journey. It must precede the consent-granting stage, since consent can only be granted by a verified energy consumer.Placement guidance#
The verifiable credential is required as evidence attached to the Consent Capture & Smart Meter Onboarding API call — consent captured without it isn't valid.
Don't let the energy consumer skip or dismiss the SDK without completing or explicitly abandoning verification.
If consent has expired or been revoked, the energy consumer must re-verify and re-grant consent before their data can be accessed again. In these cases, if they wish to reinstate their consent, they will need to reverify and re-onboard.
Typical integration points#
Some common places this step fits, depending on your product:Sign-up flow — as a step in onboarding, before the customer can link their energy account to access their smart meter data.
Settings/account page — if an energy consumer is granting data access after they've already signed up (e.g. connecting a new property or service, or re-instating smart meter data access due to consent expiry or revocation).
Handling verification failures#
If the energy consumer fails or abandons verification, they should not be able to proceed to the Consent Capture and Onboarding step. They will not be able to grant consent without a verifiable credential.If verification continues to fail, there is no limit on retry attempts - the energy consumer will not be blocked from accessing the SDK after a certain number of attempts.We recommend you advise your energy consumers to get in touch with you if they encounter verification errors when submitting details they are confident are correct, and you can then escalate to the Glow team when required.
Step 1: Add the Glow SDK script to your page#
Add the SDK script to the <head> of your page. This exposes a global GlowIDV constructor on window.Step 2: Add a container element#
Add an element where the verification iframe will be rendered. Give it an id you can target.Once the page has rendered and the container exists in the DOM, create a GlowIDV instance and mount it into your container.Initialisation must run after the container element is in the DOM. Place it in the lifecycle hook your framework provides:Plain HTML/JS — inside a window.addEventListener('load', ...) callback, or a <script> placed after the container.
React — inside a useEffect(() => { ... }, []).
Vue — inside the onMounted() hook.
Angular — inside ngAfterViewInit().
Full worked examples for each framework, including message handling, are in Framework Examples below. Configuration options#
| Option | Type | Required | Configurable | Description |
|---|
applicationId | string | Yes | Yes (if you have more than one application) | Your Glow application identifier. |
allowedMethods | string[] | Yes | Yes | The verification methods to offer the customer. See values below. |
iframeUrl | string | Yes | No | URL of the hosted Glow IDV verification iframe. |
subject | string | Yes | Yes | The identifier for the consumer being verified. |
theme | object | No | Yes | Visual customisation of the embedded flow. See Theming. |
publicGlowIdvClientKey | string | Yes | No | Unique to your organisation - will need to be included in the initialisation of the SDK to verify your identity and authorise your access to the SDK. |
customisedMessage | string | No | Yes | Message shown at the end of a successful verification, informing the energy consumer what happens next. |
applicationId value#
Your Glow applicationId for the application you're onboarding the energy consumer into (if you have more than one).allowedMethods values#
| Value | Verification method |
|---|
document-upload | Upload of a supporting document (e.g. an energy bill). |
mpxn-eui-last4 | Meter point number (MPXN) plus the last four digits of the IHD identifier. |
Pass only the methods you want to offer. The energy consumer chooses between the enabled methods at the start of the flow. See the Supported Verification Methods page for details on each.iframeUrl value#
https://register.glownetzero.com/iframe.html
subject value#
Any string you need to identify your energy consumer — an email address or a unique reference both work. It becomes the username shown in the Glow Developer and Support portals.theme object#
The theme option lets you match the embedded verification flow to your brand.theme options#
| Option | Type | Description |
|---|
logoUrl | string | URL of the logo displayed within the flow. Use a hosted, publicly accessible image. |
font | string | A CSS font-family value applied to the flow's text. |
primaryColor | string | The primary brand colour (e.g. buttons and accents), as a CSS colour value. |
secondaryColor | string | The secondary colour used throughout the flow, as a CSS colour value. |
borderRadius | string | Corner rounding, as a CSS length (e.g. 12px). |
spacing | string | The base spacing unit, as a CSS length (e.g. 16px). |
Notes on themes#
Colours accept any valid CSS colour value; hex (#f48f23) is shown here.
font accepts a standard CSS font stack.
borderRadius and spacing accept CSS length values (px, rem, etc.).
logoUrl should point at an image hosted somewhere the energy consumer's browser can reach.
publicGlowIdvClientKey value#
This will be given to you securely by the Glow team upon setting up your Organisation. The publicGlowIdvClientKey is unique to your organisation and will need to be included in the initialisation of the SDK to verify your identity and authorise your access to the SDK.Mounting#
After constructing the instance, render it into a container element by passing a CSS selector to mount:The container must exist in the DOM before you call mount.
Step 4: Add a listener to retrieve results#
The iframe communicates back to your application using postMessage. Add a listener to the parent window, verify the message origin for security, then handle each message type as outlined below.If you register the listener inside a component, remove it when the component unmounts to avoid duplicate handlers: window.removeEventListener('message', handleMessage);
Messages#
The parent DOM (the website that integrates the SDK) hosts the Glow IDV SDK via an iframe. The next section explains the message types that can be sent between them.Sent by the SDK to the iframe#
| Message | Direction | Description |
|---|
GLOW_IDV_INIT | SDK → iframe | Sends the initial configuration to the iframe. |
Received from the iframe on your page#
| Message | Direction | Description |
|---|
GLOW_IDV_READY | iframe -> Parent DOM | The iframe has loaded and is ready to receive data. |
GLOW_IDV_RESIZE | iframe -> Parent DOM | The iframe's content height has changed. |
GLOW_IDV_METHOD_SELECT | iframe -> Parent DOM | The energy consumer selected a verification method. |
GLOW_IDV_CHANGE | iframe -> Parent DOM | A field value changed. |
GLOW_IDV_FILE_UPLOAD | iframe -> Parent DOM | The energy consumer uploaded a file. |
GLOW_IDV_SUBMIT | iframe -> Parent DOM | The energy consumer submitted a form. |
GLOW_IDV_SUCCESS | iframe -> Parent DOM | Verification succeeded — carries the verifiable credential. |
GLOW_IDV_ERROR | iframe -> Parent DOM | An error occurred during verification. |
GLOW_IDV_EXIT | iframe -> Parent DOM | The energy consumer exits the journey after successfully verifying. |
Only GLOW_IDV_SUCCESS must be handled for the integration to function — the rest are optional but recommended for a polished UX.Handling each message#
GLOW_IDV_READY#
The iframe has loaded and is ready. Use this to hide any loading spinner you were showing over the frame.GLOW_IDV_RESIZE#
The iframe's content height changed. Without handling this, a fixed-height frame will clip content or show an inner scrollbar. Resize the iframe to match so the embed grows and shrinks naturally.The field name (message.height above) and whether the value is a number of pixels are not yet confirmed.
GLOW_IDV_METHOD_SELECT#
The energy consumer chose a verification method. Typically you don't need to act on this, but it's a useful analytics event — it tells you which methods energy consumers actually pick.GLOW_IDV_CHANGE#
A field value changed inside the flow. Most integrations can ignore this. Handle it only if you want fine-grained analytics or to react to the energy consumer's progress.GLOW_IDV_FILE_UPLOAD#
The energy consumer uploaded a document. Useful for showing your own confirmation or progress UI alongside the frame.GLOW_IDV_SUBMIT#
The energy consumer submitted their details and verification is now running. Show a loading state so the energy consumer knows something is happening.GLOW_IDV_SUCCESS#
Verification succeeded. This message carries the verifiable credential. Capture it, hand it to your downstream consent flow, and clean up.This is the one message you must handle. Treat the credential as sensitive — don't log it or place it in a URL.
GLOW_IDV_ERROR#
Verification failed or errored. Show the energy consumer a clear message and, where appropriate, let them try again.example of error message that comes back:{
"message": {
"status": "error",
"message": "Cannot POST /sd",
"details": {
"message": "Cannot POST /sd",
"error": "Not Found",
"statusCode": 404,
"path": "/sd",
"timestamp": "2026-07-16T13:45:50.823Z"
}
}
}
GLOW_IDV_EXIT#
After successful verification, a button lets the energy consumer exit the journey. It triggers this message, and your parent component can navigate to the next page.Successful results#
When the energy consumer completes verification, your handleMessage listener receives a message with type GLOW_IDV_SUCCESS. The payload contains the verifiable credential generated for the energy consumer, which you pass to your downstream consent and data-access flow.data in GLOW_IDV_SUCCESS:{
"data": {
"applicationId": "demo-id",
"token": {
"jwt": "eyJhbGciOiJFUzI1NiIsImtpZCI6Ing1dFMyNTYtbldhNGc...",
"jti": "vc_0wp0tBkXBDGj",
"exp": 1791102043,
"nonce": "2QJxMhn1U1pIhLAz",
"mpan_hash": "Xgw7N8rE95GDgDXmW5nzH_w_UEYnI0Kvf8k203s1SD4"
},
"verificationId": "",
"method": "agent-form",
"timestamp": "2026-07-06T08:20:43.676Z",
"subject": "test",
"mpan": "1200000000000"
}
}
A failed attempt arrives as GLOW_IDV_ERROR, and GLOW_IDV_CHANGE fires as the energy consumer progresses through the flow — useful for tracking progress or updating your own UI.The token value in the GLOW_IDV_SUCCESS message holds the Verifiable Credential. See the Verifiable Credentials page for the full VC structure and lifetime.
Framework Examples#
The Glow IDV SDK can be integrated into any JavaScript framework. Each example below sets up the SDK and handles every message type described above, adapted to that framework's lifecycle hooks.React
Vue 3
<template>
<div>
<LoadingSpinner v-if="isLoading" />
<VerifyingIndicator v-if="isVerifying" />
<div id="idv-container" ref="containerRef"></div>
</div>
</template>
<script setup lang="ts">
Angular
What Comes Next?#
Following a successful verification, the SDK generates a unique Verifiable Credential for the energy consumer. This credential is tamper-evident proof that the energy consumer's identity and address have been verified, and can be relied upon by the downstream consent and data-access flow.The verifiable credential lets you capture the energy consumer's consent to access their energy data — you must attach it as evidence to the Consent Capture & Onboarding API call.