Giter Club home page Giter Club logo

alexa-mint-skill's Introduction

alexa-mint-skill v0.3

Unofficial simple Alexa skill to collect and speak balances from Mint (http://mint.com)

Dustin Runnells ([email protected])

THIS SKILL IS FOR PERSONAL USE ONLY AND IS NOT ENDORSED BY MINT OR AMAZON - DO NOT SUBMIT THIS TO AMAZON FOR CERTIFICATION

Status

It seems to be working for me. I can get a balance on my checking accounts, credit cards and mortgage through different banks by speaking things like:

  • Alexa, ask Mint for my bank balance.
  • Alexa, ask Mint for my balances.
  • Alexa, ask Mint for my credit card balance.

Someday I'd like to add budgets to this script as well.

Notes

  • This skill is intended to be used for personal/private use. It cannot be installed from the Alexa Skills Market. Installation of this skill requires you to follow the steps that a Skill developer would need to take to create a skill for development purposes. After completing these steps you will be able to ask Alexa for bank balance information obtained from your Mint account.
  • Since this will be a development skill on your Amazon account, it will only work if your Amazon Echo device is associated with the same account that you are adding this skill to. It should appear in the Alexa app on your phone under Skills->Your Skills without any special steps needed to enable.
  • This skill is based on the Alexa PHP Helo World example by Mell L Rosandich

Dependancies

  • Linux/Unix web server capable of SSL/HTTPS with PHP installed to host the PHP Alexa skill
  • MintAPI CLI tool by Mike Rooney

Installation

  1. Install MintAPI and verify that it works on the command line.
  2. Obtain an SSL certificate (https://letsencrypt.org/ is free). This is required for all Alexa skills.
  3. Configure your web server to host an https website and copy/host all project files at that URL (eg. https://example.com/alexa-mint-skill)
  4. Edit the config.php file to include:
    • Your Mint email address
    • Your Mint password
    • The ius_session for MintAPI (See MintAPI for more info)
    • The thx_guid required for MintAPI. (See MintAPI for more info)
    • The correct path to mintapi
  5. Login to the Alexa section of the Amazon development portal: https://developer.amazon.com/edw/home.html#/
  6. Click "Get Started" in the Alexa Skills Kit box.
  7. Click the "Add New Skill" button on the top Right.
  8. Set Skill Type to "Custom".
  9. Set Name to "Mint".
  10. Set Invocation Name to "mint".
  11. Set Audio Player to "No".
  12. Click Next to move to the Interaction Model tab.
  13. Paste the following into the Intention Schema box:
{
  "intents": [
    {
      "slots": [
        {
          "name": "bankType",
          "type": "BANK_OBJECT"
        },
        {
          "name": "budgetType",
          "type": "BUDGET_OBJECT"
        },
        {
          "name": "actionType",
          "type": "ACTION_OBJECT"
        }
      ],
      "intent": "Mint"
    }
  ]
}
  1. Add a Custom Slot Type for "BANK_OBJECT" wth the values:
  • bank
  • loan
  • investment
  • credit
  • credit card
  1. Add a Custom Slot Type for "BUDGET_OBJECT" with the values:
  • food
  • shopping
  • bills
  • entertainment
  • gas
  • auto
  1. Add a Custom Slot Type for "ACTION_OBJECT" with the values:
  • budgets
  • balances
  1. Paste the below into the Sample Utterances box:
Mint get {bankType} balance
Mint get {actionType}
Mint get {budgetType} budget
Mint get my {bankType} balance
Mint get my {actionType}
Mint get my {budgetType} budget
Mint for my {bankType} balance
Mint for my {actionType}
Mint for my {budgetType} budget
Mint for the {bankType} balance
Mint for the {actionType}
Mint for the {budgetType} budget
  1. Click the Next button to move on to the Configuration tab.
  2. Set Service Endpoint Type to HTTPS.
  3. In the text box under the region enter the HTTPS URL where you are hosting the alexa.php file from this project (eg. https://example.com/alexa-mint-skill/alexa.php ).
  4. Click the Next button to move to the SSL Certificate tab.
  5. Select "My development endpoint has a certificate from a trusted certificate authority".
  6. Click Next to move to the Test tab.
  7. Type "Mint get my bank balance" in the simulator and confirm that no obvious errors appear in the returned JSON.
  8. Try on your Amazon Echo. If all went well, you should now be able to ask Alexa to retrieve your bank balances.

Troubleshooting

Make sure that the MintAPI CLI tool is working with your account. This skill will execute the command as follows based on the configuration that you provided in config.php:

mintapi --session <ius_session> --thx_guid <thx_guid> <mint email address> <mint password>

Development

Want to contribute? Let me know! This is my first GitHub project, I'd love to hear how to make it better.

License

MIT

alexa-mint-skill's People

Contributors

drunnells avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

0x38 evanreilly

alexa-mint-skill's Issues

Skill deployment question

Dustin,

Thank you so much for the Mint skill page! It’s super great!

I’ve a question regarding the procedure.

I followed the entire procedure and successfully applied all steps.

  • Mint api is working well (I can see my account info)
  • RHEL 7.2 webserver is up and running
  • HTTPS (w/ SSL certificate) is working
  • config.php was successfully modified
  • Can https the following link: https://[websiteURL].com/alexa-mint-skill/alexa.php (getting the following output: [] -> is that expected?)

When I’m trying to test the new skill (step #24), I’m not seeing any JSON error but I’m getting the following output:

Service Request:

{
  "session": {
    "sessionId": "SessionId.ca74e596-e740-4af7-952b-26375d19c956",
    "application": {
      "applicationId": "amzn1.ask.skill.47ce287c-8df2-4cc6-bb0b-cfda4b438b3a"
    },
    "attributes": {},
    "user": {
      "userId": "amzn1.ask.account.AHVLTG66IMV677YSN2RGYR6U4LGBXPZZAHKBWQDRCJMHMCFELQMVQJTIZVV4B47R3QJVJLV6E5GI3MY5LEEGX2ZJNYKU53PJXGL2K4OPOFYPY55QM4C6O5ITVROKZMJA2RBGNTDPBWWHGXOU6DAUL7SQHBIPBA36AYT4N2ZQSZ5BWSRS7AGKMWAV5ILGAF267NNFDZJUT2CMBOI"
    },
    "new": true
  },
  "request": {
    "type": "IntentRequest",
    "requestId": "EdwRequestId.c8e377c4-2bd2-4b8a-bd1a-8957a2f68137",
    "locale": "en-US",
    "timestamp": "2017-04-14T04:17:59Z",
    "intent": {
      "name": "Mint",
      "slots": {
        "budgetType": {
          "name": "budgetType"
        },
        "actionType": {
          "name": "actionType"
        },
        "bankType": {
          "name": "bankType",
          "value": "bank"
        }
      }
    }
  },
  "version": "1.0"
}

Service Response

{
  "version": "1.0",
  "response": {
    "outputSpeech": {
      "type": "PlainText",
      "text": "**Mint was unable to process your request.**"
    },
    "card": {
      "content": "**Mint was unable to process your request**.",
      "title": "Mint",
      "type": "Simple"
    },
    "shouldEndSession": true
  },
  "sessionAttributes": {
    "countActionList": {
      "read": "true",
      "category": "true",
      "curentTask": "none"
    }
  }
}

Also, when asking Alexa the following questions, Alexa is unable to answer
• Alexa, ask Mint for my bank balance.
• Alexa, ask Mint for my balances.
• Alexa, ask Mint for my credit card balance.

What am I missing?

Thanks much in advance!

Login Issues?

Looks like login doesn't work. This if my first time setting it up, but for some reason I can't get past authentication, even with the mintapi (which I do realize you didn't write). Wondering if you got around this somehow or if it's also no longer working for you.

The remote endpoint could not be called, or the response it returned was invalid.

In last step of tutorial:
Type "Mint get my bank balance" in the simulator and confirm that no obvious errors appear in the returned JSON.

I get the error in the title. MintAPI works fine. Alexa skill files are stored under: https://<domain.com>/
i.e. I can access alexa.php on the web via https://<domain.com>/alexa.php (a "[]" is displayed) and this is the exact endpoint I have listed in the Service Simulator. Why am I getting this service response? Please Help, I am so close

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.