Quick Start

The Enlighten Systems API is a JSON-based API that provides access to performance data for a PV system. By using the Enlighten Systems API, you agree to the Enphase Energy API License Agreement.

Please note that the Enlighten Systems API does not provide performance data at a panel or microinverter level.

Making API requests

To make API requests, you’ll need an API key and the user_id of an Enlighten user (see below). To test-drive the API, you can use the user_id 4d7a45774e6a41320a. This is a special “demo” user for whom you can make API requests while you write and test your app.

Request

$ curl -v "https://api.enphaseenergy.com/api/v2/systems/67/summary?key=452a5aac149b0fe246999de0455a7575&user_id=4d7a45774e6a41320a"

Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Status: 200
{"system_id":67,"modules":35,"size_w":6270,"current_power":271,"energy_today":30030,"energy_lifetime":59847036,"summary_date":"2015-03-04","source":"microinverters","status":"normal","operational_at":1201362300,"last_report_at":1425517225}

The user_id 4d7a45774e6a41320a is a special “demo” user for whom you can make API requests while you write and test your app.

Creating Your Account and Getting Your API Key

To sign up for a developer account and an API key, click the Register link and fill out the form. You will receive an email with instructions for activating your account. Follow these instructions, log in, and go to your Applications. A default application has been created for you to hold your API key, Authorization URL, and other information you’ll need:

  • Name – Give your application a meaningful name and description. These will be presented to your users when you request access to their Enlighten systems, described below.
  • Description – A description of what your application does.
  • Plan – Which plan you’ve chosen. You can upgrade or downgrade your usage limits here.
  • Status – Indicates whether your application can make API requests.
  • API Key – The value you’ll use in the “key” parameter when making API requests. Do not share this with anyone.
  • Developed By – An optional field indicating who wrote your application. If you develop mobile apps, for example, you should use the same name here as you do in the app stores where you publish.
  • Authorization URL – A link you’ll need to provide to your users so that they can grant your application access to their production data. Discussed in detail below.

Getting Access to Enlighten Systems

Your application needs permission to make API requests for a system. Use your application’s Authorization URL to get that permission from Enlighten users. When they click on the URL, they’ll see this form in Enlighten:




Note: Your application’s Name, Description, and Developed By attributes are displayed on this form. You can edit them in the Applications section of this site.

When users confirm your application’s access, they see the following page:




How you incorporate the Authorization workflow into your application depends on what kind of app you are writing.

Authorizing Your Application for Your Own Systems

If you have an Enlighten account, you probably already have one or more systems. In this case, click on your application’s Authorization URL and grant yourself access. Use your API key and your user_id to make API requests.

Authorizing a Web Application

If you don’t have an Enlighten account, or if you are developing an application to share with other Enlighten users, your application needs permission to access their systems. If you are writing a web application, you can request that we redirect to a page of your choosing after the user has authorized your application. Add a query parameter named redirect to your Authorization URL; e.g.,

https://enlighten.enphaseenergy.com/app_user_auth/new?app_id=123&redirect=http://mydomain.com/enlighten_user_id

This URL should accept GET requests that include a user_id parameter on the query string. Save the user_id from the request parameter, and use it plus your API key to make requests on this user’s behalf.

Authorizing a Mobile Application

Include the Authorization URL in your application. When your users click that link and submits the form, you will be able to make API requests on his behalf. The user_id required for making requests is in two places:

  • In the response header, in a key named enlighten-api-user-id
  • In the body of the response

You can either fetch the user_id from the response header, or request your user to enter it in your application. Use this value and your API key to make requests on this user’s behalf.

Read the docs