Getting Consent
When a market requires consent, you'll need to redirect your end-consumer to our consent flow. This guide explains how to handle this process.
Whether consent is required depends on the market and your site's eligibility. Some markets require an explicit consent from the end-consumer to participate, so we can prove this to network operators.
You are responsible for ensuring your end-consumers complete the consent flow. This means:
- You must detect when consent is required from the market eligibility response
- You must redirect your end-consumers to our consent flow
- You must provide a valid redirect URL where end-consumers can return after completing the process
The consent flow cannot be completed without your involvement - it's a critical part of the market activation process.
Details​
When a market requires consent, you'll receive a URL in the market eligibility response. For example:
{
"name": "BE_DSO_FLUVIUS_CONGESTION",
"status": "action_required",
"action": {
"name": "consent_required",
"url": "https://app.powernaut.io/contract/123e4567-e89b-12d3-a456-426614174000/sign"
}
}
Before redirecting your end-consumer to the provided URL, you must append a redirect_url
query parameter to specify where end-consumers should be redirected after completing the consent flow.
The redirect_url
query parameter is required. The consent flow will not work without a valid redirect URL where we can send end-consumers after they complete the process.
Example of a properly constructed consent URL:
- TypeScript
- Python
- Go
- C#
- Java
const consentUrl = new URL(action.url);
consentUrl.searchParams.append("redirect_url", "https://your-app.com/callback");
// Redirect end-consumer to consentUrl.toString()
from urllib.parse import urljoin, urlencode
# Add required redirect_url parameter
params = {"redirect_url": "https://your-app.com/callback"}
# Construct the final URL
final_url = f"{action['url']}?{urlencode(params)}"
# Redirect end-consumer to final_url
import (
"fmt"
"net/url"
)
// Parse the base URL
baseURL, err := url.Parse(action.URL)
if err != nil {
panic(err)
}
// Add the redirect_url parameter
query := baseURL.Query()
query.Add("redirect_url", "https://your-app.com/callback")
baseURL.RawQuery = query.Encode()
// Redirect end-consumer to baseURL.String()
using System;
using System.Web;
var baseUrl = new Uri(action.Url);
var query = HttpUtility.ParseQueryString(baseUrl.Query);
query["redirect_url"] = "https://your-app.com/callback";
var builder = new UriBuilder(baseUrl)
{
Query = query.ToString()
};
// Redirect end-consumer to builder.Uri.ToString()
import java.net.URI;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
URI baseUri = new URI(action.getUrl());
String query = baseUri.getQuery();
String redirectUrl = URLEncoder.encode("https://your-app.com/callback", StandardCharsets.UTF_8);
String newQuery = query == null ? "redirect_url=" + redirectUrl : query + "&redirect_url=" + redirectUrl;
URI finalUri = new URI(
baseUri.getScheme(),
baseUri.getAuthority(),
baseUri.getPath(),
newQuery,
baseUri.getFragment()
);
// Redirect end-consumer to finalUri.toString()
Our consent flow will:
- Guide the end-consumer through the consent process
- Explain the market participation details
- Capture their consent in a compliant way
- Redirect them back to your application using the provided
redirect_url
After consent is captured, the market status will automatically update to active
. You can verify this by querying the markets endpoint again.
Customization​
The consent URL supports several query parameters to customize the experience:
Parameter | Required | Description |
---|---|---|
redirect_url | Yes | URL where end-consumers will be redirected after consent is captured |
country | No | ISO 3166-1 alpha-2 country code to limit address suggestions |
locale | No | An IETF BCP 47 locale code. Supported locales are en , fr , nl . |
The feature to customize the branding of the consent flow (colors, logos, etc.) in the Powernaut Portal is currently under construction.
If you need to set up your branding, please reach out to us.
Examples​
There are several ways to implement the consent flow, depending on your application's needs and user experience preferences:
Native Application​
The most direct approach is to redirect end-consumers within your native mobile application when you detect that consent is required. This works well when:
- End-consumers are actively engaged in your application
- You want to maintain the most seamless user experience
- You have control over the end-consumer's current session
You can use the redirect_url
query parameter to redirect the end-consumer to a page in your application.
Email Notification​
Another option is to send a consent link via email, you can just send the consent URL to the end-consumer and let them open it in their browser.
For an optimal user experience, you should make sure that the redirect_url
query parameter of the URL is set to a page in your (web) application that clearly shows a message that they're now active in the market.
Other Channels​
You can also implement the consent flow through other channels such as:
- Push notifications
- SMS notifications
- In-app messages
- Customer support interactions
- Physical mail (with QR codes)
Choose the implementation method that best matches your end-consumers' preferences and your application's existing communication channels. The key is to ensure end-consumers can easily access and complete the consent flow.
Next Steps​
Once consent is captured:
- Send us your baselines
- Start reporting your flexibility, by bidding
- Handle activations when the grid needs your flexibility