Authentication (API Keys)

All requests to the Leap API endpoints must include a valid Bearer token in the HTTP Authorization header. Create an API key in staging or production environments and use this key in the Authorization header as shown below.

šŸ“˜

Making Initial Calls From Your Browser

The Leap developer portal has SSO integration with the Leap Partner Portal. If you click the 'Log In' button in the top right corner of this screen, you will be logged in (or given the chance to enter your portal credentials). Logging in will automatically populate a temporary Bearer token in the CREDENTIALS box of the API Reference pages so you can easily make calls from your browser in staging or production. If you get a Forbidden error, refresh the page to make sure you are still logged in.

Obtaining an API KEY

You can create API keys for both production and staging environments. These keys can be created on your Partner Account page in production or staging. You can also reach this page in the portal by clicking on your name in the top right corner of the screen, and selecting ā€˜Partner account’.

ā—ļø

Production vs. Staging

API keys are scoped to production or staging environments separately so make sure you are creating your key in the appropriate environment in which you want to use it. You will receive a 403 error if the key is invalid.

Add an API key, select the appropriate permissions, and click Create.



Authorization Headers

Requests are authorized through the Authorization HTTP header. The API_KEY must be used in the Authorization header as shown below.

Header format

Authorization: Bearer <API_KEY>

POST /account/<account-id>/meters/search HTTP/2
Accept-Encoding: gzip
Host: example.com
Authorization: Bearer 4P0u5KS3NuAOrw6Y:G9ztJlkDvBqdZjHf1J5bLtpY4t8DwI097LeCS4LoKC2gaIuszjWKVNTlMF30kAdbhqcAkguOtDhh7GwWpyYPTK7NAP3NExfkOM5Y1QwvR74vDPByMTWZxUIztEhxXbWsipKJXMZGm9LSrd7svedj4Rod2BfrJ4VwgUB0qb8o7ulPHrmtuYoFOdtqG5xacL5n

What’s Next