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).

Request

$ curl -v "https://api.enphaseenergy.com/api/v2/systems/67/summary?key=APPLICATION-API-KEY&user_id=ENLIGHTEN-USERID"

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}

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:



Retrieving an Enlighten User’s ID

Each API request should include a User ID along with the API key. Depending on the type of application, the authorization workflow is different. Steps to retrieve a User ID from an Enlighten user are mentioned below:

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 along with 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