1. Glow IDV SDK
Glow Platform
  • Welcome to Glow Data Service!
  • Getting Started
  • Glow Portals
  • Introducing the Glow System
  • API Authentication
  • Smart Meter Onboarding
    • Introducing Smart Meter Onboarding
    • Smart Meter Eligibility Check
    • Terms and Conditions APIs and Management
    • Onboarding Methods — Direct Integration
      • EUI/Postcode Check
      • AVS Check
    • Onboarding Methods — Hosted Integration
      • Glow IDV SDK
        • Introducing the Glow SDK
        • Supported Verification Methods
        • Implementation Guide — Web
        • Implementation Guide — Mobile
        • Verifiable Credentials
        • Verification Result Screen
        • Consent Capture & Onboarding
    • Onboarding Methods — No Integration
      • Invitation Functionality
      • Agent Verification Portal
  • Data Retrieval
    • Retrieving Time Series Data from Onboarded Users
  • Consent Management and Offboarding
    • Consent Management
    • Offboarding
  • Glow CADs & Fulfilment
    • Glow CAD Fulfilment
  • API Reference
    • Smart Meter Elgibility
      • eligibility
        • smets-ihd-cad
          • Check MPxN has CAD/PPMID
        • checksmetsihd
          • postcode
            • Match EUI IHD with postcode
          • Match EUI IHD with MPxN
        • checksmetsmpxn
          • Check MPXN is eligible in DCC.
    • Content System
      • content
        • {contentId}
          • get a content object
          • Update an existing content object
        • Find all the content objects of an application
        • Add a content object
      • languagecontent
        • {languageContentId}
          • get a language content object by ID
          • Update an existing language content object
        • Find all the language content objects of an application
        • Add a language content object
      • termsconditions
        • {tcId}
          • get a terms and conditions object by ID
        • current
          • Find the terms and conditions that are in force.
        • Find all the terms and conditions of an application
        • Add terms and conditions
      • termsconditionsuser
        • {tcUserId}
          • get a specified terms and conditions user obj
        • Find all the responses to terms and conditions documents.
        • Add a user's response to Terms & Conditions document
      • supportdetails
        • {supportDetailsId}
          • get a support details object
        • Find all the support detail objects of an application
        • Add a support details object
      • faq
        • {faqId}
          • get a FAQ object
        • Find all the FAQ objects of an application
        • Add a faq object
      • prompttype
        • {promptTypeId}
          • get a Prompt Type object
        • Find all the prompt type objects of an application
        • Add a Prompt Type object
      • prompt
        • {promptId}
          • get a Prompt object
        • Find all the prompt objects of an application
        • Add a Prompt object
      • promptuser
        • {promptUserId}
          • get a Prompt User object
        • Find all the prompt user objects of an application
        • Add a Prompt User object
      • useraction
        • {userActionId}
          • get a User Action object
        • Find all the user action objects of an application
        • Add a User Action object
      • useractiontype
        • {userActionTypeId}
          • get a User Action Type object
        • Find all the user action type objects of an application
        • Add a User Action Type object
    • User System
      • register
        • User self registers
      • account
        • {accountId}
          • status
            • Find the status of a specified account. If the account is using an external directory service, this call will confirm whether the user is authenticated against it. This call requires administrative application level credentials.
          • mobileapptoken
            • Add mobile app token to a user
            • Remove a mobile app token to a user
          • Find specific account of an application.
          • Updates the account's metadata.
          • Delete account
        • status
          • With a given JWT token a user can have their account status verfied. If their account is created under an external directory service, this call will establish whether a user's token to the external service is still valid.
        • email
          • Change a user's email
        • name
          • Change a user's name
        • changepassword
          • Change a user's password
        • Find all accounts of an application
        • Add an account to an existing user
      • user
        • {userId}
          • username
            • Change a user's username
          • Find specific user that has an account in an application.
          • Delete specific user. This will delete all the accounts of a user. Please refer to delete account API. This API requires specific permissions.
        • verify
          • Generate a user verification token
          • Verify a user verification token
        • resetpassword
          • Generate a token that can be used by user to reset their password.
          • A user resets their password
        • verification
          • status
            • mpxns
              • renewal
                • Renew consent for a number of meterpoints
              • revocation
                • Revoke consent for a number of meterpoints
            • mpxn
              • {mpxn}
                • renewal
                  • Get meter point consent renewals
                  • Renew meter point consent
                • revocation
                  • Get meter point consent revocations
                  • Revoke meter point consent
            • API to retrieve user's meter points' consent and verification
        • Find specific user that has an account in an application from the username.
        • Create a user
      • accountprofile
        • {profileName}
          • Find specific group of application
        • Find all the profiles of an account
        • Create an account profile under a given profileName.
      • accountsession
        • get the session of an account
        • Update an account session.
      • auth
        • token
          • {tokenId}
            • Deletes a token, specified by its tokenId.
          • Returns all the tokens that are active and valid for a specified user.
        • newToken
          • Generate a new token for an account.
        • deleteToken
          • delete a token
        • oauth
          • access
            • Exchange the Authorization Code for an Access Token.
          • Check and validate an Oauth Access token.
          • Authenticate a user and generate an OAuth 2.0 Authorization Code Grant.
        • Checks whether a user token is valid.
        • authenticate an account
    • Virtual Entity System
      • vesys
        • appstats
          • find statistics on the number of Virtual Entities per application
      • virtualentity
        • {id}
          • resources
            • Find the resources of that belong to Virtual Entity with ID
          • attribute
            • Find a Virtual Entity's metadata by ID
            • Add/Update a Virtual Entity's metadata
            • delete metadata from the Virtual Entity
          • Find Virtual Entity by ID
          • Update a Virtual Entity
          • Delete a Virtual Entity
        • Add a new Virtual Entity
        • Find all Virtual Entities
      • vetype
        • {id}
          • resources
            • Find all resources that belong to a user that satisfy the Resource Types in the Virtual Entity Type definition.
          • Find Virtual Entity Type by ID
          • Update a Virtual Entity Type
        • Add a new Virtual Entity Type
        • Find all Virtual Entity Types
    • Webhook System
      • webhook
        • {webhookId}
          • Find webhook by ID
        • error
          • {errorId}
            • Find a particular webhook error
          • Find all the webhooks that have failed
        • Find all webhooks of an application (or user)
    • Resource System
      • resource
        • {id}
          • readings
            • Get resource readings
          • current
            • Get the current resource reading.
          • first-time
            • Get the UTC time of the first available reading
          • last-time
            • Get the UTC time of the most recent available reading
          • meterread
            • Get the cumulative value reported on a metering device. (Not supported for all resource types).
          • tariff
            • Get the latest tariff that is being applied to a resource.
          • tariff-list
            • Get the tariff history that is being applied to a cost resource.
          • catchup
            • Trigger a request to retrieve the latest available readings from the DCC.
          • glowbinary
            • API that returns the resource's raw data in the Glow Binary format.
          • Find resource by ID
        • count
          • Count the number of resources per resourceType
        • Add a new resource
        • Find all resources per user or application
      • resourcetype
        • {id}
          • resource
            • Find resources of a specific resource type that belong to a user
          • appresource
            • Find resources of a specific resource type that an application has access to
          • Find resourceType by ID
        • Add a new resource type.
        • Find all resource types
    • Notification System
      • alerttype
        • {alertTypeId}
          • Find alert type by ID
          • Updates the alert type's metadata.
        • Find all alert types of an application
        • Create an alert type
      • alert
        • {alertId}
          • Get an alert by Id
        • user
          • Get the alerts sent to a user
        • Send an alert
      • template
        • {templateId}
          • Find template type by ID
          • Updates the teplate's metadata.
        • {alertTypeId}
          • {channelType}
            • {cultureCode}
              • Find template by alertTypeId, channeType and cultureCode
              • Create template by alertTypeId, channeType and cultureCode
        • Find all templates of an application
        • Create a template
      • notification
        • {notificationId}
          • log
            • Get the logs of a particular notification
          • Get a notification by Id
    • DFS
      • dfs
        • termsconditions
          • The current version of terms and conditions that is pertinent to DFS for a particular application.
        • user
          • Get all the users that have opted in the DFS functionality
          • User opts in to DFS functionality for a particular MPxN. The mpxn field is only required if a user has more than one MPxN.
          • User opts out of DFS functionality
        • event
          • {dfsEventId}
            • user
              • Get all the users that have participated in a particular DFS event
          • user
            • participation
              • API to indicate User participating in particular DFS event
            • Get all the events a user has signed up for
    • Device Management System
      • devicetype
        • {id}
          • Find Device Type by ID
        • Add a new Device Type
        • Find all device types
      • device
        • {id}
          • status
            • This call can be used to see whether a gateway device is sending packets to the Glow Platform (i.e. via WiFi).
          • Find device by ID
        • resource
          • {resourceId}
            • Find the device that sources a specified resource.
        • meter-point
          • {meterPointNumber}
            • inventory
              • Get the DCC inventory of a meter point
            • resources
              • Get the resources associated to a meter point
        • smart-meter
          • {eui}
            • inventory
              • Get the DCC inventory of a meter point by providing an EUI.
        • status
          • This call can be used to see whether a gateway device is sending packets to the Glow Platform (i.e. via WiFi).
        • Get a user's devices
        • Add a new device
      • discover
        • {hardwareId}
          • Find device by ID
  1. Glow IDV SDK

Implementation Guide — Mobile

Integrating the Glow SDK into a React Native app#

The Glow IDV SDK is an embeddable browser component, so it cannot be called directly from React Native — there is no DOM, no iframe and no window.postMessage.
Instead, use @glow/idv-react-native. The package hosts the SDK in a
WebView, performs the origin check the protocol requires, and hands results back as typed callbacks. You never write a host page or parse a message.
If you are integrating a web front end, follow the Implementation Guide instead. This page is only for React Native.

Installation#

react-native-webview is a peer dependency and contains native code, so a full rebuild is required — a JavaScript reload will not pick it up.

Requirements#

React Native0.71 or later
React18 or later
react-native-webview13 or later

Prerequisites#

The same as any Glow SDK integration — see
Implementation Guide:
Your application ID, from the Glow Developer Portal
A publicGlowIdvClientKey, issued by the Glow team
A subject for each energy consumer — an email address or unique reference

Step 1: Configure once at the root#

Wrap your application in GlowIdvProvider. Everything below it can then present verification without repeating configuration.
import { GlowIdvProvider } from '@glow/idv-react-native';

export default function App() {
  return (
    <GlowIdvProvider
      publicGlowIdvClientKey={PUBLIC_GLOW_IDV_CLIENT_KEY}
      applicationId={APPLICATION_ID}
      theme={{
        logoUrl: 'https://your-app.example.com/logo.svg',
        primaryColor: '#f48f23',
        borderRadius: '12px',
      }}
      customisedMessage="You're verified. We'll start collecting your readings shortly.">
      <YourApp />
    </GlowIdvProvider>
  );
}
Supply the client key from a build-time secret store rather than committing it. Anything inside an app binary can be extracted.

Step 2: Present verification#

Two presentations are available. Both run the same flow and produce the same result — choose whichever fits your journey.

As a modal#

Best when verification is triggered from a screen that does something else — a settings page, or a "connect your meter" prompt.
import { useGlowIdv } from '@glow/idv-react-native';

function ConnectMeter({ email }: { email: string }) {
  const { presentVerification } = useGlowIdv();

  const connect = async () => {
    const result = await presentVerification({ subject: email });

    if (result.status === 'verified') {
      await captureConsent(result.token);
    } else if (result.status === 'failed') {
      showError(result.error.message);
    }
    // 'cancelled' — the energy consumer dismissed the sheet.
  };

  return <Button title="Connect my meter" onPress={connect} />;
}
Execution pauses at the await for as long as the energy consumer is in the flow — choosing a method, entering their MPXN or photographing a document, and reading the confirmation screen. Everything after it runs once they are done.
presentVerification never rejects. Every outcome resolves as a VerificationResult.

Embedded in your own screen#

Best when you already have a dedicated verification step in your sign-up flow.
import { GlowIdvView } from '@glow/idv-react-native';

<ScrollView>
  <Text style={styles.heading}>Verify your address</Text>
  <GlowIdvView
    subject={email}
    onVerified={result => setCredential(result.token)}
    onExit={() => navigation.navigate('Terms')}
    onError={error => setError(error.message)}
  />
</ScrollView>
The view grows to fit the flow as it progresses, so place it inside a ScrollView.
Wait for the exit before navigating
onVerified fires when the credential is issued, but the SDK then shows its own confirmation screen — including customisedMessage. Navigating away in onVerified replaces that screen before the energy consumer sees it. Capture the credential there, and move on in onExit.
The modal presentation does this for you.

Step 3: Handle the result#

The result is a discriminated union, so a token can only be read from a successful verification.
type VerificationResult =
  | {
      status: 'verified';
      token: string;          // the signed verifiable credential (JWT)
      mpan: string;           // the meter point verified against
      method: string;         // the method the consumer chose
      verificationId: string;
      timestamp: string;
    }
  | { status: 'failed'; error: { code: GlowIdvErrorCode; message: string } }
  | { status: 'cancelled' };
result.token is the signed credential you attach to the
Consent Capture & Onboarding call.

Error codes#

Branch on code rather than message text, which is not stable.
CodeMeaningSuggested handling
VERIFICATION_FAILEDThe details did not verifyShow error.message and let them retry
NETWORK_ERRORThe service could not be reachedAsk them to check their connection
SDK_LOAD_FAILEDThe SDK could not be loadedReport as temporarily unavailable
INVALID_CREDENTIALSuccess reported, but no readable credentialTreat as a failure and retry
CONFIGURATION_ERRORRequired configuration missingA developer error — check the provider props
There is no limit on retry attempts.

Verification methods#

ValueMethod
mpxn-eui-last4Meter point number plus the last four digits of the IHD identifier
energy-bill-uploadUpload of a supporting document
Both are offered by default; the energy consumer chooses at the start of the flow. To offer only one:
<GlowIdvProvider allowedMethods={['mpxn-eui-last4']} …>

Permissions for document upload#

energy-bill-upload opens a camera or photo picker, which the host app must
declare.
On iOS a missing usage string is not an error — the operating system terminates the app the moment the picker opens. These entries are required, not optional.
ios/YourApp/Info.plist:
<key>NSCameraUsageDescription</key>
<string>Used to photograph a document when verifying your address.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Used to choose a document when verifying your address.</string>
android/app/src/main/AndroidManifest.xml:
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" tools:targetApi="33" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32" />
<uses-feature android:name="android.hardware.camera" android:required="false" />
Offering only mpxn-eui-last4 avoids this entirely, and is a reasonable first integration — verification is instant and there is no native permission surface.

Handling the credential#

The credential is valid for three months.
Send it to your server, which makes the consent call. That call carries
organisation-level credentials.
Do not log it, including to crash reporters. The JWT decodes to a payload
containing whatever you supplied as subject, frequently an email address.
Do not display it in your interface.
Do not persist it in storage you do not control. Keep it in memory and
clear it on sign-out.

Testing#

A Jest mock is included, so tests never touch the network or a WebView.
presentVerification resolves as verified by default. To exercise other paths:

API reference#

GlowIdvProvider#

PropTypeRequiredDescription
publicGlowIdvClientKeystringYesIssued by the Glow team
applicationIdstringYesYour Glow application identifier
allowedMethodsIdvMethod[]NoDefaults to both methods
themeGlowIdvThemeNoVisual customisation of the flow
customisedMessagestringNoShown on the confirmation screen
closeLabelstringNoLabel for the modal's dismiss control
hostUrlstringNoServe the host page from your own origin

useGlowIdv()#

MethodReturnsDescription
presentVerification({ subject })Promise<VerificationResult>Presents the flow as a modal

GlowIdvView#

PropTypeDescription
subjectstringIdentifier for this energy consumer
onVerified(result) => voidCredential issued
onExit() => voidThe consumer left the flow
onError(error) => voidVerification failed or errored
onResult(result) => voidEither outcome, if you prefer one callback
onMethodSelect(method) => voidWhich method was chosen — useful for analytics
allowedMethodsIdvMethod[]Overrides the provider
autoHeightbooleanGrow to fit the flow. Defaults to true
styleViewStyleApplied to the container

theme#

OptionTypeDescription
logoUrlstringPublicly reachable image URL
fontstringA CSS font-family value
primaryColorstringPrimary brand colour
secondaryColorstringSecondary colour
borderRadiusstringCorner rounding, as a CSS length
spacingstringBase spacing unit, as a CSS length

Troubleshooting#

SymptomCause
The flow opens in Safari or Chrome instead of staying in the appA WebView originWhitelist narrower than the package sets. Do not override it
The confirmation screen never appearsNavigating in onVerified instead of onExit
App crashes when the picker opens on iOSMissing NSCameraUsageDescription or NSPhotoLibraryUsageDescription
File picker never opens on AndroidA WebView setSupportMultipleWindows override
An error inside react.development.jsTwo copies of React — check that react and react-native resolve to one instance
Changes to configuration are not appliedMetro caches aggressively. Restart with npm start -- --reset-cache

Support#

For issues with the SDK or this package, contact support@glownetzero.com.
Modified at 2026-09-02 10:30:12
Previous
Implementation Guide — Web
Next
Verifiable Credentials
Built with