Implement Green Button Connect (ESPI) OAuth flow and download interval energy data

domain: greenbuttonalliance.org · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Register your application as a third-party (TP) with the utility's Green Button Connect My Data program to receive a client_id and client_secret; each utility runs its own authorization server.
  2. Redirect the customer to the utility's authorization endpoint with response_type=code, client_id, redirect_uri, and scope (typically covering UsagePoint and related ESPI resources).
  3. Exchange the returned authorization code for an access token and refresh token at the utility's token endpoint using a POST with grant_type=authorization_code.
  4. Retrieve the list of usage points via GET /espi/1_1/resource/Subscription/<SUBSCRIPTION_ID>/UsagePoint using the access token as a Bearer token in the Authorization header.
  5. Download interval block data via GET on the ElectricPowerUsageSummary or IntervalBlock resource paths; parse the Atom/XML feed, extracting IntervalReading values, their start timestamps (epoch seconds), and duration.

Known gotchas

Related routes

Implement Green Button (ESPI) asynchronous notification callbacks so a DataCustodian pushes new usage data instead of being polled
greenbuttonalliance.org · 5 steps · unrated
Batch-download Green Button Download My Data (DMD) ESPI XML files from a utility DataCustodian API without requiring customer OAuth authorization
greenbuttonalliance.org · 6 steps · unrated
Parse the Green Button/NAESB ESPI Atom+XML feed (UsagePoint, MeterReading, IntervalBlock, IntervalReading, ReadingType) returned after a Connect My Data authorization.
greenbuttonalliance.org · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans