1. Get a Dashboard account
Before you begin, make sure to create an account and complete onboarding. Once completed, you’ll be able to access your API keys.
Before you continue, invite your team members to join your Flatpeak account.
Go to Dashboard > Settings > Team, and add their emails. They’ll
receive an automatic invitation.
2. Try Connect flow
1
Clone our repo and install the required dependencies
2
Configure Environment Variables
If you are on Windows, ensure you appropriately set env variables for your shell.
3
Launch locally
http://localhost:7070
.You can also use the Flatpeak-hosted version at
https://connect-web.flatpeak.com. If you choose this option, replace
http://localhost:7070 with this URL in the steps below.

4
Authenticate to access Flatpeak API
- Go to the Dashboard API section to retrieve your Account ID and API Key. Use test (sandbox) mode key.
- Base64 encode the combination of
account_id:api_key
and make a request to create-a-bearer-token endpoint.
5
Generate a Connect Token
Flatpeak implements a single-use session token to provide access to Connect
API endpoints, so you don’t need to expose API keys to your customer-facing
app
If you’re looking to prototype receiving callbacks (i.e. for
callback_uri
), we recommend using https://webhook.site, but you can use any other service.6
Open the Connect app with Token
On your computer, where you already have Flatpeak connect code running locally, open: 
http://localhost:7070?fp_cot=cot_***
. Replace **cot_ with the connect_token
. The resulting URI may look similar to this example:
7
Interact with the Connect flow
Connect will present you with a set of pages that will let you share your tariff information. It automatically chooses the best route to discover your tariff based on the availability of provider APIs, data-sharing regulations and frequency of provider use within the Flatpeak base.

The quickest way to test the Connect flow is with your own account from a
supported energy provider. Just select that provider during the flow. Don’t
have access to a compatible account? Contact
support and we’ll provide one for testing.
8
Receive callback
Once click Save button on Your Tariff screen, Connect will send the following to
callback_uri
you specified:Example callback
9
Exchange completed Connect token for Location ID
Once you received a callback and using
connect_token
as a reference, call exchange-connect-token endpoint to obtain a location_id
that represents a permanent identifier of a property address in Flatpeak. In the future you will store it in your database in reference to the physical location of your customer’s property.10
Get tariff rates
You can now query the tariff-rates API endpoint to obtain tariff data.