Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

mrw34/monzo-api-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Monzo API Boilerplate

This is a minimal JavaScript web app that can be used for getting started with the Monzo API. It's built using Node.js, Express and Pug.

The app simply lists your transactions after prompting you to login via OAuth.

To make your own editable copy just do the following:

  1. In another window sign into https://developers.getmondo.co.uk
  2. Go to Clients > New OAuth Client
  3. Enter Name, Description and choose Not Confidential
  4. Submit then click on the name of your newly created client
  5. Open a second copy of this page and click Remix this at the top
  6. Click on .env in the sidebar and paste in your Monzo Client ID and Client Secret
  7. Click on your project name at the top-left, click copy and paste into ROOT_URL
  8. Set SESSION_SECRET to a random string
  9. Click on Show at the top of the page
  10. Log in and see your transactions!

You can then edit index.pug and server.js to your heart's content. The following are left as exercises:

  1. Error handling ;)
  2. Using an existing Monzo API library
  3. Persisting sessions across server restarts
  4. Handling token refreshes
  5. Retrieving more than the first 100 transactions (via pagination)

The code is also available on GitHub