GoMeddo Rest API & API docs

Overview

The GoMeddo API docs allow you to explore and test the GoMeddo REST API directly from your browser. To use it, you need to authenticate against your own Salesforce org using OAuth 2.0.

This guide walks you through the full setup: creating an External Client App in Salesforce, configuring CORS, and authorizing via the API docs portal.


Prerequisites

  • A Salesforce org with GoMeddo installed

  • System Administrator access (or equivalent permissions to manage App Manager and CORS settings)

  • A Salesforce user account you will use to authenticate


Step 1: Create an External Client App

Note: Salesforce has replaced Connected Apps with External Client Apps for OAuth integrations. If you previously used a Connected App for this purpose, you will need to migrate to an External Client App.

  1. In Salesforce, go to Setup → search for App Manager and open it.

  2. Click New External Client App (top right).

  3. Fill in the required fields:

    • Label: e.g. GoMeddo API Docs

    • Name: auto-filled

    • Contact Email: your email address

  4. Under OAuth Settings, enable Enable OAuth Settings.

  5. Add the following Callback URL:

    https://apidocs.gomeddo.com/oauth2-redirect.html
    
  6. Under Selected OAuth Scopes, add at minimum:

    • Access and manage your data (api)

    • Perform requests at any time (refresh_token, offline_access)

  7. Save the app. Salesforce may take a few minutes to provision it.


Step 2: Retrieve Your Client ID

  1. In External Client Applications, find your newly created External Client App and click View.

  2. Copy the Consumer Key. You will need this when authorizing in the API docs.


Step 3: Configure a CORS Whitelist Entry

The API docs portal makes browser-based requests to your Salesforce org, so your org must allow cross-origin requests from the docs domain.

  1. In Salesforce, go to Setup → search for CORS and open it.

  2. In 'Allowed Origins List', Click New and add:

    https://apidocs.gomeddo.com
    
  3. Save.


Step 4: Find Your Salesforce Instance URL

The instance URL you need is not always the same as what appears in your browser's address bar (especially for orgs using My Domain). To get the exact URL:

  1. Open the Developer Console in Salesforce (from the top-right gear menu).

  2. Go to DebugOpen Execute Anonymous Window.

  3. Run the following Apex:

    System.debug(URL.getOrgDomainUrl());
    
  4. Open the Logs tab, select the log entry, and look for the DEBUG line. Copy the URL shown there (e.g. https://yourorg.my.salesforce.com).


Step 5: Authorize in the API Docs

  1. Open https://apidocs.gomeddo.com.

  2. Click the Authorize button (lock icon, top right of the page).

  3. In the authorization dialog:

    • Paste your Salesforce Instance URL into the instance URL field.

    • Paste your Client ID into the client ID field.

  4. Click Authorize — this will redirect you to Salesforce to log in and approve access.

  5. Log in with your Salesforce user credentials and click Allow.

  6. You will be redirected back to the API docs, now authenticated.


Step 6: Use the API

With authorization in place, you can now use the Try it out button on any endpoint in the API docs to send live requests against your Salesforce org.


Troubleshooting

Issue

Likely cause

Fix

redirect_uri_mismatch error

Callback URL in External Client App doesn't match exactly

Make sure https://apidocs.gomeddo.com/oauth2-redirect.html is listed exactly as a Callback URL

CORS error in browser console

CORS whitelist not configured

Add https://apidocs.gomeddo.com to your org's CORS whitelist (Step 3)

"Invalid client" error

Wrong Client ID pasted

Double-check the Client ID from the External Client App's detail page

Authorization succeeds but requests fail

OAuth scopes too restrictive

Ensure api scope is included in the External Client App's OAuth settings

Instance URL not working

Using the wrong org URL

Use the URL from URL.getOrgDomainUrl() via Anonymous Apex (Step 4)