This repository is a helpful reference for how to interact with the MX Connect Widget. It should help answer questions like:
- What events does the widget send to my app?
- How can I react to events that happen in the widget?
- What changes if I need to use a webview in a mobile app?
- How can I close the widget?
Obtain your API credentials
- Sign up at https://dashboard.mx.com and log in.
- Obtain your Api Key and your Client ID from your dashboard
- Copy
.env.samplein the root directory to a new file named.envand fill in the values
Set up a Client
- In the terminal navigate to
./clients/web - Run
npm install
Set up a Server
- In the terminal navigate to
./servers/nodejs - Run
npm install - Start the server using
npm start
Start the node server before opening a client, otherwise the client will not be able to load the widget.
The web Client
- This is automatically running with the Node Server
- Navigate to http://localhost:3000 to open it.
Mobile Client
- There is an iOS app in the
./clients/iosdirectory. You can open the Xcode project and run it on a simulator or device.