The MDAPI is used in Questionnaires and lookup fields across Litify. Follow this guide to set up or reset MDAPI in both sandbox and production environments.
To reset or troubleshoot the MDAPI in a sandbox environment, follow all steps in this article. To Reset MDAPI in a production environment, Pre-Setup Steps and Production MDAPI Setup Steps. If you're setting up the MDAPI for the first time, click here to skip ahead to Production Setup.
Table of Contents
Important Pre-Setup/Reset Steps:
If you are resetting the MDAPI, or configuring the MDAPI in a sandbox, you must first complete these steps to reconfigure it.
- Navigate to Setup > App Manager and delete the MDAPI app.
- Then navigate to Named Credentials and delete the MDAPI named credentials.
- Finally, navigate to Auth Providers and delete the MDAPI auth provider.
NOTE: If you are troubleshooting or resetting the MDAPI, click here to skip to Production Setup Steps
Sandbox MDAPI Setup Steps
- Log in to your sandbox.
- In Setup, navigate to App Manager > LitifyMDAPI > View.
- Copy the Consumer Key and Consumer Secret.
4. In Setup, navigate to Auth. Providers > LitifyMDAPI and paste the Consumer Key and Consumer Secret.
5. In Setup, navigate to My Domain and copy the domain name in “Your domain name is” section.
6. Navigate to Named Credentials > LitifyMDAPI > Edit, then change the URL to the mydomain URL you copied in the previous step. Make sure to include “https://” at the beginning. Click Save.
7. Navigate back to App Manager > LitifyMDAPI > View. Click Edit and change the Callback URL to match the mydomain from the previous step.
Important note: make sure this begins with “https://” and ends with “/services/authcallback/LitifyMDAPI” -- you are only editing the URL between these two.
8. You're ready to begin using MDAPI in your new sandbox.
Production MDAPI Setup Steps
- Click Configure MDAPI from the App Launcher. You will be directed to this page:
- You may find that the first step of this process is already completed. If so, you can skip this part of the setup guide. Otherwise, hit the Configure button all the way to the right of the first step. This automatically completes the first step:
- For step 2, you are prompted to refer to this setup instruction.
- Go to Setup > App Manager and scroll to the App named LitifyMDAPI. On the right-hand side is a dropdown button. Click it and then click the View link.
- In the area labeled API (Enable OAuth Settings) on the top line will be a Consumer Key and Consumer Secret (you need to click the link by Consumer Secret to see the actual value). Copy both values to use in the next step.
- Go to Setup > Auth. Providers and scroll to the Auth. Provider named LitifyMDAPI.
- Click Edit.
- Enter the Consumer Key and Consumer Secret in the corresponding fields.
- Return to the 'Configure MDAPI' page and it will complete the rest of the automated setup. At that point there's one more manual step and again it says to refer to these instructions.
- Go to Setup > Named Credentials and locate LitifyMDAPI and click the Edit link.
- 10. Ensure that the Start Authentication Flow on Save checkbox is checked, which it should be by default.
- Click Save.
- Important Note: If you get an error stating this or something similar (error=invalid_client_id&error_description=client%20identifier%20invalid) after clicking save, you simply have to wait a few minutes for the Auth Provider to complete setup. Wait a few minutes then refresh the page, then click Save again to continue.
- You will be redirected to the Salesforce login page. Log in using your Litify credentials.
- Upon logging in, you will be asked if you want to Allow Access.
- Click the blue Allow button.
- Finally, visit 'Configure MDAPI' once more and you will see the setup is complete.