Skip to main content
This is the workflow for OAuth in mobile apps:

1. Create a Member

To create an OAuth member, set the following:
  • "is_oauth": true.
  • client_redirect_url in the oauth object so we can send you UI messages with the right scheme. This can be any string; this guide uses https://mx.com.
  • "referral_source": "APP" in the oauth object tells MX to use your client_redirect_url to return users to your app.
You cannot include end-user credentials in the request body when creating an OAuth member, so they’re never shared with a third party. We recommend always including a unique id when creating any Platform API resource to simplify syncing between your systems and ours. Endpoint: POST /users/{user_guid}/members

2. Load the OAuth URI

Load the oauth.authorization_url from the last step in an ASWebAuthenticationSession (iOS) or Auth Tab (Android).
Do not open the OAuth window in a WebView. Some financial institutions have security restrictions for certain web containers or browsers. Use ASWebAuthenticationSession for iOS, or an Auth Tab via Chrome Custom Tabs for Android. See OAuth WebView Limitations for more information.
Authorization URLs are one-time use. Don’t hard code an expected URI into your application. To get a new URL, use the create OAuth authorization URL endpoint (POST /users/{user_guid}/members/{member_guid}/oauth/authorization_url). Don’t prepend https:// to the URI string; MX includes it. Here, the user interacts with the institution’s OAuth page and chooses what data to share with MX and, therefore, with you. When finished, the user is redirected to your oauth.client_redirect_url. MX appends the success or error status and the member GUID to this URL.
Example client_redirect_url with Appended Information