This demo application is built in ruby on rails and uses the integration environment. It will demonstrate how to generate an authorization code which enables sharing account data with one of our Processing Partners.
Here's an overview of the flow and concepts will be shown
- Create a user via the MX API.
- Connect the user to an institution, like a bank, using MXconnect.
- Verify the new member's accounts using MXconnect.
- Generate an authorization code for a single verified account.
- (What's next?) Share the authorization code with one of our partners to allow them access to that account's information.
Extra information about the above flow
- Users are an essential resource. We use their unique
guid
for nearly all of the API calls in this application. - This app uses MXconnect to connect a user to an institution, and to verify their accounts. While using the widget is not required, it handles a lot of complexity with connecting users to various Institutions. To learn more about using MXconnect see how to get an MXconnect URL and how to load MXconnect.
You can skip to Configuration if you're going to run the app in Docker
- Install ruby v 3.1 Ruby downloads page
- Install bundler
$ gem install bundler -v 2.3.6
- run
bundle install
In order to run the app you'll need to provide the credentials given to you by MX. To get credentials you can sign up for a free account at dashboard.mx.com.
To configure the app with your MX credentials
- Create a
.env
file at the root of the demo - Copy the contents of
.env.sample
to your new.env
- From dashboard.mx.com, copy the values for API Key and Client ID into
.env
# .env example values
MX_API_KEY=abcd1234
MX_CLIENT_ID=abcd1234
In order to use processor tokens, your MX client must have these features enabled
- Account Verification
- Processor API
- Open a terminal, and navigate to the root of the project
rails s
orbin/rails s
will start the server- (when you're done)
Ctrl C
to stop the server - Open the app in your browser to begin
Copy and Paste
docker build -t mx-token-demo .
docker run -p 3000:3000 --env-file .env mx-token-demo
Or customize your image name
docker build -t <YOUR_IMAGE_NAME> .
docker run -p 3000:3000 --env-file .env <YOUR_IMAGE_NAME>
Open the app in your browser to begin