Overview
Try out our Connect Widget by using the MXquickconnect app. It’s great way to learn about integrating with the MX Platform. The app, coupled with sample code, demonstrates adding new users and members (connecting a user to their financial account) and making additional requests for a number of use cases.
You’ll need your api_key
and client_id
from the Client Dashboard to set up the backend.
To access the app, click the Github Repository button.
Github RepositoryBackend Setup
The app requires that you set up the frontend and backend for a successful launch. The instructions you need to get started follow.
You can run the backend with either Ruby, Node.js, Python3, or AspNet.
- Open your terminal and clone the app from Github if you haven’t already.
- Navigate to the mx-quickconnect folder using
cd mx-quickconnect
- Set up an environment using the following commands in your terminal:
1
2
cp .env.example .env
vi .env
- Insert your A
api_key
andclient_id
from the Client Dashboard.
Note: To enter, typei
to enter insert mode, then move the cursor and type in your values. Finally, type:wq ENTER
on your keyboard to save and exit the file. - Run the backend using one of the following sets of commands. Select your language below.
1
2
3
cd mx-platform-aspnet-core
dotnet add package MX.Platform.CSharp
dotnet run
1
2
3
cd mx-platform-node
npm install
npm start
1
2
3
cd python
pip3 install -r requirements.txt
./start.sh
1
2
3
cd ruby
bundle install
./start.sh
Frontend Setup
Once your backend is running, set up your frontend. All frontend implementations run Node.js. You must have npm version 7 or later installed.
- Open a new terminal. Make sure to keep the backend terminal open and running.
- Navigate back to the folder you cloned your project in.
- Run the following commands in your terminal:
1
2
3
cd frontend
npm install
npm start
Your localhost runs automatically from your default browser. If your browser does not automatically appear enter localhost:3000 into your preferred browser.
Using the MXquickconnect App
After you set up the backend and frontend, your browser displays the app homepage. From here, you’ll be guided through creating a user and a member. Creating a user and member connects the end user’s financial account to the MX platform. After you’ve created your first user, you can return and launch the app with a previously created user, or you can create a new user.
The app limits you to 5 users.
The following steps explain how to use the widget with OAuth and example data.
-
Select one of the Launch buttons to get started.
- If it’s your first time using the app, select Launch with new user.
- If you’ve visited the app before, you can either select Launch with new user to create a new user or Launch with previous user to continue with a user that has already been created.
When you select one of the Launch buttons, an embedded widget appears. The page also displays example information you’ll need make a successful connection including a bank, username, and passwords.
-
Select Continue.
A list of financial institutions appears. -
Select MX Bank (OAuth).
The Sign In page appears. -
Select Sign in.
An Authorization Required page appears. This is an example of how OAuth is implemented to provide an end user with additional security. -
Select Authorize.
After the user is verified, the account selection page appears. -
Select an account.
The app shows two options (either savings or checking) for this demo. You can select either one. -
Select Continue.
This verifies the information provided. When successful, the page displays theuserGuid
andmemberGuid
.
The userGuid
and memberGuid
are results of a successful verification. These two GUIDs can be used to complete additional requests to the MX Platform API. In the rest of this guide, these two GUIDs are used to automatically make requests to additional endpoints.
Making Additional API Requests
After you’ve used the app to create users and members, use the connection to make requests to some of our endpoints to retrieve additional data.
Our app provides you with a few of our most common uses cases including:
- Account Verification
- Identify Member
- Check Balances
- List Transactions
For each request, select the Run button next to the request you’d like to make. The app displays the following information for each request.
- The method and endpoint required to request the information.
- A brief description of the endpoint.
- The information returned in plain text format as a table.
- The request payload in JSON.