Bypass Endgrate UI (Beta)

In some cases, you may want to display your own UI to your users. While we highly recommend using Endgrate's built-in UI customization, we support bypassing the Endgrate UI for this scenario.

The general user flow of the experience consists of displaying a list of providers to your users, redirecting to Endgrate's authentication pop-up when a provider is chosen, and displaying a list of resources from that provider for your user to select. Afterwards, you can push and pull data just like any standard connection.

Bypassing the Endgrate UI consists of the following steps:

  1. Call the GET api/integrations endpoint to get the full list of supported providers. You can iterate through the providers array to get the provider name, display name, logo, and more. See the API reference for the full data format.
// Example response to GET api/integrations
{
  "providers": [
    {
      "provider": {
        "name": "hubspot",
        "display_name": "HubSpot",
        "url": "https://www.hubspot.com/",
        "image": "https://endgrate.nyc3.cdn.digitaloceanspaces.com/integration/hubspot.png",
        "auth_type": "oauth",
        "specific": {},
        "endgrate_provider_type": "CRM"
      },
      "integrations": [
        {
          "display_name": "Contact",
          "endgrate_type": "crm-contact",
          "supports_push": true,
          "supports_pull": true,
          "is_custom_object": false,
          "supports_associations": true
        }
      ]
    }
  ]
}
  1. Display the list of providers to your user using your own UI.
  2. Once your user chooses a provider, use the POST api/session/initiate to initiate a session. Make sure the provider attribute is set to the user's choice and the bypass_ui flag is set to true. Feel free to set any other body parameters you need.

🚧

Warning

Don't use UI-related body parameters in your request β€” because the Endgrate UI is being bypassed, these parameters will not be supported:

  • field_selection
  • resource_selection
  • schema_selection
// Example request to POST api/session/initiate
curl --request POST \
     --url https://endgrate.com/api/session/initiate \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "bypass_ui": true,
  "provider": "hubspot",
}
'
  1. After your user authenticates, you'll be able to retrieve a list of resources, including custom objects, that your user has set up in the provider chosen. To do this, call the GET api/integrations endpoint again with the provider and session_id query parameters. All available resources and their corresponding endgrate_types will be in the integrations attribute.
// Example request to GET api/integrations
curl --request GET \
     --url 'https://endgrate.com/api/integrations?provider=hubspot&session_id=6566e85e7cf20dca9cef0c0a' \
     --header 'accept: application/json'
  1. Display the list of resources to your user using your own UI.
  2. Once your user selects resource(s), call the POST api/schemas endpoint, indicating which resource(s) you would like to integrate with.
curl --request POST \
     --url https://endgrate.com/api/schemas \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "data": [
    {
      "endgrate_type": "Example Custom Object",
      "associations": true
    }
  ]
}
'

And that's it! Afterwards, you can continue to use Endgrate like any standard connection. Call the GET api/session/configuration endpoint to get the data formats you'll be working with, and trigger transfers with the POST api/pull/transfer and POST api/push/transfer endpoints.