AmazonEchoApi Save

This is a simple way to login to Amazon and retrieve the unnoficial Echo API

Project README


UPDATE: Check out an implementation

This is a simple way to login to Amazon and retrieve the unnoficial Echo API. I purposely didn't use Amazon SDKs so anyone can see how to simulate a login and implement with any language. The endoint investigation was done by Owen Piettes and can be found here

Here is a list of some the endpoints that are of particular interest to observe:

Basic Usage

  AmazonEchoApi amazonEchoApi = new AmazonEchoApi("","username", "password");
  if (amazonEchoApi.httpLogin()){
    String output = amazonEchoApi.httpGet("/api/todos?type=TASK&size=1");

After getting output you can parse the JSON and do whatever you want. If you look at my main, you will see that I check the TODO list every 15 seconds and store the itemId. If there is a new one then I go ahead and trigger whatever I want.

This example was build with Netbeans and runs in a Raspberry Pi. I included the following libs:

  • HttpClient
  • Simple-JSON
  • JSoup

Full Example

    public static void main(String[] args) throws InterruptedException, IOException {
        AmazonEchoApi amazonEchoApi = new AmazonEchoApi("","username", "password");
        if (amazonEchoApi.httpLogin()){
            while (true) {                
                String output = amazonEchoApi.httpGet("/api/todos?type=TASK&size=1");

                // Parse JSON
                Object obj = JSONValue.parse(output);
		JSONObject jsonObject = (JSONObject) obj;
                JSONArray values = (JSONArray) jsonObject.get("values");
                JSONObject item = (JSONObject)values.get(0);
                // Get text and itemId
                String text = item.get("text").toString();
                String itemId = item.get("itemId").toString();
                if (!checkItemId(itemId)){
                    // Do something. ie Hue Lights, etc
                    System.out.println("No new commands");
                // Sleep for 15 seconds

Open Source Agenda is not affiliated with "AmazonEchoApi" Project. README Source: noelportugal/AmazonEchoApi
Open Issues
Last Commit
9 years ago

Open Source Agenda Badge

Open Source Agenda Rating