Locoia
  • Overview
  • Account and User Settings
    • User types
    • Adding Users
    • Teams
    • Access Permissions
    • 2 Factor Authentication 2FA
    • Versioning and Snapshots
    • Activity Log
  • Reset your Password
  • Invoices and Payments
  • Automation
    • Flow Builder
      • Flow Building Best Practices
      • Jinja Template Language
        • Jinja: (Custom) variables, wildcards and functions
        • Magic Code Samples
      • Connectors & APIs
        • Titles and References
        • Referencing data of objects, lists, arrays - how to pass data dynamically
        • Accessing Objects with JSONPath
        • Merging nested JSON objects
        • Parsing JSONs from String
        • Response Headers & Status Codes
        • Custom Data Fields
        • Wildcard API calls and actions
        • Response cleaning
      • Text Strings, Date & Time, Numbers and Currencies
        • Text and Strings
        • Dates & Time
        • Numbers (Thousand Separators, Currencies)
      • Email-formatting
      • Code Fields
      • Running single Flow steps
      • Flow run data retention, logging, and error notifications
      • Advanced View
      • Dynamic Title
      • Custom Error Handling
      • Error Handling Flows
      • Automatic Pagination
    • Flow Debugger
      • Automatic Retrying
      • Run Flows again
      • Troubleshooting Flows
    • Community Library
  • Connectors & Helpers
    • Connectors
      • Monday.com
      • ActiveCampaign
      • Aircall
      • Allthings
      • Amplitude
      • Animus
      • Assetti
      • Awork
      • AWS RDS Database - How to connect
      • bubble.io
      • Casavi
      • Chargebee
      • CleverReach
      • comgy
      • commercetools
      • Everreal
      • Exact Online
      • Facebook Marketing
      • Fahrländer Partner
      • FastBill
      • FILESTAGE.io
      • Freshdesk
      • Freshsales
      • Google Ads
      • Google Ads Lead Form
      • Google Analytics
      • Google Chat
      • Google Drive
      • Google Sheets
      • Gmail
      • HubSpot
      • Heyflow
      • iDWELL
      • ImmobilienScout24
      • Instagram Ads
      • Intercom
      • klaviyo
      • Kiwi Opening Doors
      • Klenty
      • Klipfolio
      • Kolibri CRM
      • konfipay
      • KUGU
      • Shopify
      • S3 AWS
      • SQS AWS
      • Lambda AWS
      • Learnster
      • lexoffice
      • LineMetrics
      • Linkedin
      • Locoia
      • Notion
      • MailGun
      • Makula
      • Microsoft Dynamics 365
      • Microsoft OneDrive
      • MixPanel
      • MongoDB
      • Odoo
      • OnFleet
      • OnOffice
      • Oracle NetSuite
      • Outbrain
      • Quickbooks
      • Trello
      • PandaDoc
      • Personio
      • Pinterest Ads
      • Pipedrive
      • Plentific
      • PriceHubble
      • relay
      • REALCUBE
      • Sage ERP
      • Salesforce
      • SAP
      • Scoro
      • Seafile
      • sevDesk
      • SharePoint
      • SharpSpring
      • Slack
      • Snapchat Marketing
      • Snowflake
      • Teamleader Focus
      • Teamwork.com
      • Tableau
      • TikTok
      • TinQwise
      • The Trade Desk
      • Twitter
      • Typeform
      • WordPress
      • Xero
      • Youtube
      • Zendesk
      • Zoho CRM
      • Zoom
    • Helpers
      • Scheduler
      • Webhook
      • Dict Helper
      • Spreadsheet Helper
      • REST Helper
      • Boolean Helper
      • Multi Case Helper
      • Looper
      • FTP Helper
      • CSV Helper
      • XLSX Helper
      • Mail Sender
      • Flow Trigger
      • File Storage Helper
      • Terminate Helper
      • Delay Helper
      • SQL Connector
      • PDF Helper
      • Zip Helper
      • Data Warehouse Helper
      • XML Helper
      • Form Helper
      • Arrow
      • Error Arrow
    • Authentication Types Available
      • Setting up authentication
      • OAuth1
      • OAuth2
      • Refreshable token
      • AWS Signature
      • Basic Auth and Other Simple Authentication Methods
      • How are API versioning and API updates handeled?
      • Custom OAuth2 clients (apps)
    • Building Connectors
      • Base Connector Setup
        • Connector Auth Validation
        • GraphQL APIs
        • Rendering with User Input
      • Building Connector Actions
        • Actions Examples
      • Search Automation
      • Pagination Automation
      • Uploading Files in Actions
      • Working with SOAP APIs
    • Super Actions
    • Webhook Trigger for Connectors
    • Data Mapping and Env Variables
  • Embed - White Label Portal
    • Embed Overview
      • 1. Embed Flow
        • 1.1 Creating Embed Flows
        • 1.2 Updating Embed Flows
        • 1.3 Embed Error Handling
        • 1.4 Setting up Callbacks for Integration activation/deactivation
        • 1.5 Setting up Remote search
        • 1.6 Setting up End User logs
      • 2. Configure Embed
        • 2.1 Embed Integration via SSO
        • 2.2 Proprietary connector setup
        • 2.3 Sharing level
        • 2.4 Consent screen
        • 2.5 Account Secrets
        • 2.7 Further settings
      • 3. Integrate Embed
        • 3.1 iframe vs native embed
        • 3.2 Customizing CSS
        • 3.3 Events emitted from iframe to parent window
      • 4. Embed for End User
        • 4.1 Embed Remote Search
        • 4.2 Embed End User Logs
      • 5. Test Embed Configuration
        • Testing example
      • 6. Embed Integrations and Connector Auths
    • Embed FAQs
  • Data and Dashboards
    • Dashboards & Insights
      • Introduction to Dashboards
      • Introduction to Insights
      • Introduction to Data Sources
      • Dashboard Filters
      • Insight Marketplace - Using Pre-Built Insights
      • Writing SQL Queries
      • Useful SQL Examples
      • Charts
        • Line Chart
        • Bar and Horizontal Bar Chart
        • Stat Card
        • Pie Chart
        • Gauge Chart
        • Donut Chart
        • Stacked Bar, Horizontal Stacked Bar, and Normalized Horizontal Stacked Bar
        • Multiple Line Chart
        • Pivot Table
        • Map Chart
  • Best Practice Guides
    • Integration Best Practices
    • Integration Check List
    • CSV Files in Excel
    • Multi-Tenant Flows
    • On-Premise Integrations
    • Database Connection Setup
    • Data and General Security
    • Using Tags
    • FAQ
  • API
    • Locoia API Authentication - Personal Access Token
    • Create Connector Authentication
  • Contact us
  • Status of Service
  • Data Privacy
  • Imprint
Powered by GitBook
On this page
  • Introduction
  • Available variables
  • Examples
  • EverReal - Custom subdomain and multiple OAuth2 environments
  • Snowflake - Custom subdomain, headers, OAuth2 clients
  • SharpSpring - URL token extension

Was this helpful?

  1. Connectors & Helpers
  2. Building Connectors
  3. Base Connector Setup

Rendering with User Input

The base domain, header, url token extension, and config can be flexibly rendered with user input from Connector Auths.

PreviousGraphQL APIsNextBuilding Connector Actions

Last updated 29 days ago

Was this helpful?

Introduction

In the , additional fields can be configured which are then shown in the Connector Auth creation and can be used for rendering in these fields:

  • Base Domain

  • Header (inside custom_headers)

  • URL Token Extension

  • Authentication Configuration (inside config)

If the api_endpoint variable is specified (i.e. all older Connector Auths with a custom base domain), it will always be used instead of trying to render the base domain. This ensures that changes are backwards compatible.

Available variables

For security reasons, not all can be used, only these variables are available:

  • account_id

  • api_endpoint

  • api_version

  • authorization_request_url

  • client_id

  • client_secret

  • config

  • domain

  • encoding

  • environment

  • grant_type

  • integration_code

  • key

  • port

  • protocol

  • refresh_request_url

  • region

  • scope

  • secret

  • slug

  • subdomain

  • system_id

Examples

EverReal - Custom subdomain and multiple OAuth2 environments

EverReal has custom subdomains, OAuth2, and different environments which have different client IDs and secrets.

Authentication Configuration

{
  "oauth2": {
    "auth_form": [
      {
        "name": "subdomain",
        "title": "Subdomain",
        "type": "text",
        "required": true,
        "info": "Will be filled in for {{ subdomain }} in https://{{ subdomain }}.everreal.co/api/prism/",
        "pattern": "/^[\\w-_]+$/",
        "regexErrorMessage": "The subdomain can only contain letters, numbers, -, and _"
      },
      {
        "name": "environment",
        "title": "Environment",
        "type": "select",
        "required": false,
        "default": "Production",
        "enum": [
          "Production",
          "QA"
        ]
      }
    ],
    "config": {
      "client_id": "{% if environment is defined and environment == 'QA' %}production_client_id{% else %}qa_client_id{% endif %}",
      "client_secret": "{% if environment is defined and environment == 'QA' %}production_client_secret{% else %}qa_client_secret{% endif %}",
      "step1_authorize_url": "{% if subdomain is defined %}https://{{ subdomain }}.everreal.co{% else %}{{ api_endpoint | url_origin }}{% endif %}/accounts/dialog/authorize"
      // ... other config values
    }
  }
}

To be fully backwards compatible, for Connector Auths created before this change (these have the api_endpoint variable specified, which consists of the entire base domain), one needs to check whether subdomain is defined and, based on that, use either the subdomain or the api_endpoint to construct the OAuth2-specific URLs.

Base Domain

https://{{ subdomain }}.everreal.co/api/prism/

As mentioned above, the base domain is backwards compatible by design, as it's by default overwritten with the api_endpoint variables if it is specified.

All other fields are not affected by the rendering.

Snowflake - Custom subdomain, headers, OAuth2 clients

Snowflake is an especially complex connector, as it requires custom OAuth2 clients and multiple account identifiers. See our Snowflake Connector docs for more details and the rendered Connector Auth form.

To avoid overcomplicating the rendering further, all existing Snowflake Connector Auths were migrated to work with the updated Connector setup, ensuring backwards compatibility was not an issue.

Authentication Configuration

Due to the high number of required details in Snowflake, this is one of the most extensive configurations. Additionally, all fields are required, as no defaults can be set.

{
  "oauth2": {
    "auth_form": [
      {
        "name": "system_id",
        "title": "Organization Name",
        "type": "text",
        "required": true,
        "info": "The name of your Snowflake organization"
      },
      {
        "name": "account_id",
        "title": "Account Name",
        "type": "text",
        "required": true,
        "info": "The unique name of your account within your organization. https://docs.snowflake.com/en/user-guide/admin-account-identifier.html#account-name"
      },
      {
        "name": "subdomain",
        "title": "Account Locator",
        "type": "text",
        "required": true,
        "info": "Identifier assigned by Snowflake when the account was created. https://docs.snowflake.com/en/user-guide/admin-account-identifier.html#format-2-legacy-account-locator-in-a-region"
      },
      {
        "name": "client_id",
        "title": "Client ID",
        "type": "text",
        "required": true,
        "info": "See authentication documentation for details"
      },
      {
        "name": "client_secret",
        "title": "Client Secret",
        "type": "password",
        "required": true,
        "info": "See authentication documentation for details"
      }
    ],
    "config": {
      "client_id": "{{ client_id }}",
      "client_secret": "{{ client_secret }}",
      "step1_authorize_url": "https://{{ system_id | lower }}-{{ account_id | lower }}.snowflakecomputing.com/oauth/authorize"
      // ... other config values
    }
  }
}

Not all variable names correspond to the names used in Snowflake, as only a limited number of variable names are available to keep configurations uniform.

However, this does not matter to the user, as the title (i.e., the field name seen by the user) can be set freely.

Base Domain

For Snowflake, and most other Connectors, the 'base' part of the base domain is the same as the 'base' part of the OAuth2 authorization URL:

https://{{ system_id | lower }}-{{ account_id | lower }}.snowflakecomputing.com/api/v2/

This is also a good example of making the input for the user as easy as possible, as users can simply copy and based their organization and account name (which are by default shown in upper case letters in Snowflake) in the form and they do not need to know how exactly the URL is constructed.

Header

{
  ...
  "custom_headers": {
    "Snowflake-Account": "{{ subdomain }}"
  }
}

SharpSpring - URL token extension

For SharpSpring, the auth token and another variable need to be sent as query parameters instead of header values.

Authentication Configuration

The configuration is a fairly regular basic auth configuration, except for the Account ID field.

{
  "basic_auth": {
    "auth_form": [
      {
        "name": "account_id",
        "title": "Account ID",
        "type": "password",
        "required": true
      },
      {
        "name": "auth_token",
        "title": "Secret Key",
        "type": "password",
        "required": true
      }
    ],
    "config": {}
  }
}

URL Token Extension

Here the {{ endpoint }} always needs to be specified and the auth token is always referenced to as token.

{{ endpoint }}&secretKey={{ token }}&accountID={{ account_id }}

Header

In the Header token_in_header needs to be set to false, so that it is available in the URL Token Extension fields.

{
  "encode": false,
  "token_in_header": false,
  "content_type": "application/json",
  "token_format": "{{token}}"
}

Thus, the user needs to specify their subdomain and can optionally set their environment (default is production); see for an example.

The header follows the standard , except for one custom header, whose value is rendered from the Connector Auth user input:

authentication configuration
variables that can be specified
our EverReal Connector docs
OAuth2 header