Skip to main content

Universal OAuth Connection Guide

Universal OAuth is a flexible authentication service that allows you to connect to any OAuth-based API. This guide explains the three authentication methods available and how to use them with REST API components.

Overview

When working with modern APIs, most services require authentication to access their data. Universal OAuth supports three authentication methods:
  • OAuth 2.0 - The standard authorization flow where you log in through the provider’s website
  • Client Credentials - Server-to-server authentication using API keys
  • Custom Auth - Flexible option for non-standard authentication endpoints
Once authenticated, your connection can be used in REST API Source and Destination components to read from or write to any API.

OAuth 2.0 (Authorization Code Flow)

This is the most common authentication method used by services like Google, GitHub, Slack, Salesforce, and many others. It provides secure access without sharing your password with third-party applications.
OAuth 2.0 authorization code flow connection form

How It Works

1

Configure your connection

Enter your Client ID, Client Secret, and the provider’s OAuth URLs
2

Click 'Authenticate'

A popup window opens showing the provider’s login page
3

Log in and authorize

Sign in to your account and grant permission to access your data
4

Connection is established

The popup closes and your connection is ready to use

Configuration Fields

Redirect URI: When setting up your OAuth application with the provider, use this callback URL: https://app.xplenty.com/auth/universaloauth/callback

Advanced Options

  • Use HTTP Basic Authentication for token exchange - By default, the Client ID and Client Secret are sent in the body of the token request. Enable this option to send them as an HTTP Basic Auth header instead:
Some providers, such as Notion, only accept client credentials in the Basic Auth header and reject credentials sent in the request body with 401 invalid_client. Enable this option for those providers. The current state of the checkbox is applied each time you click Authenticate. If you untick it and reconnect, the credentials are sent in the request body again. The same setting is used when the token is refreshed during job runs and previews.

Security Features

Universal OAuth implements industry-standard security measures:
  • PKCE (Proof Key for Code Exchange) - Prevents authorization code interception attacks
  • State Parameter - Protects against cross-site request forgery (CSRF) attacks
  • Automatic Token Refresh - Tokens are automatically refreshed before they expire (when refresh tokens are available)

Client Credentials

Client Credentials authentication is designed for server-to-server communication where no user interaction is required. This is commonly used for backend services, automated processes, and APIs that don’t access user-specific data.
Client Credentials authentication connection form

How It Works

1

Enter your credentials

Provide your Client ID and Client Secret
2

Click 'Authenticate'

The system directly requests an access token from the provider
3

Token is received

No popup or user login required

Configuration Fields

Advanced Options

  • Use HTTP Basic Authentication for token exchange - Send the Client ID and Client Secret in the Authorization: Basic header instead of the request body (required by some providers). This setting also applies when tokens are re-requested during job runs and previews.
  • Use custom parameter key names - Some APIs use non-standard parameter names for client credentials

When to Use Client Credentials

  • Accessing APIs that don’t require user authorization
  • Machine-to-machine communication
  • Background jobs and automated processes
  • APIs that use API keys or service accounts

Custom Auth

Custom Auth provides maximum flexibility for APIs that don’t follow standard OAuth patterns. You can configure any HTTP request to obtain an access token from any endpoint.
Custom Auth connection form with HTTP method and URL fields

How It Works

1

Configure the request

Specify the HTTP method, URL, headers, and body
2

Define the token path

Tell the system where to find the access token in the response
3

Click 'Authenticate'

The system makes the configured request and extracts the token

Configuration Fields

Understanding Response Path (JSONPath)

The Response Path tells the system where to find the access token in the API’s response. Use dot notation to navigate nested JSON structures: Example Response:
Response Path: $.data.access_token

Path Examples

When to Use Custom Auth

  • APIs with non-standard authentication endpoints
  • Legacy APIs that don’t follow OAuth 2.0
  • APIs requiring custom headers or body parameters
  • Token endpoints that return tokens in non-standard response formats

Custom Authentication Header

By default, the access token obtained from any authentication flow (OAuth 2.0, Client Credentials, or Custom Auth) is sent as a Bearer token in the Authorization header: Authorization: Bearer eyJhbGciOiJIUzI1NiIs… Some APIs require the token to be sent using a different header name or format. For example, Shopify uses X-Shopify-Access-Token instead of Authorization: Bearer. The “Use custom authentication header” checkbox allows you to customize how the token is sent.

How to Configure

1
Check the “Use custom authentication header” checkbox (available on all three OAuth types)
2
Enter the Header Name - the HTTP header to use for authentication
3
Optionally enter a Header Prefix - the text placed before the token value. Leave empty to send the token without any prefix.

Configuration Fields

Examples

Using Your Connection in REST API Components

Once you’ve created a Universal OAuth connection, you can use it in REST API Source and Destination components to authenticate your API requests.

How Authentication Works

When you select a Universal OAuth connection in a REST API component:
  1. The system retrieves the stored access token from your connection
  2. The token is automatically added to your API requests using the configured authentication header (default: Authorization: Bearer {token})
  3. If a custom authentication header is configured, the token is sent using the specified header name and prefix instead
  4. Your request is sent to the API with proper authentication
Default Request Header: Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9… Custom Header Example (Shopify): X-Shopify-Access-Token: shpua_ff47f0800268bf212f8…

Setting Up a REST API Source

1
Add a REST API Source component to your pipeline
2
In the Choose input connection section, select Connection
3
Choose your Universal OAuth connection from the dropdown
4
Configure your API endpoint URL and other settings
5
The authentication is handled automatically

Token Refresh

For connections that support refresh tokens (OAuth 2.0 flow with providers that issue refresh tokens), Integrate.io ETL automatically refreshes expired tokens before making API calls so your pipelines keep running without manual intervention. During job runs and previews, an OAuth 2.0 token is refreshed only when it is missing or its known expiry time has passed. If the provider does not report an expiry time, Integrate.io ETL treats the token as valid and uses it as-is. Some providers, such as Notion, issue a refresh token without an expiry time. If Use HTTP Basic Authentication for token exchange is enabled on the connection, the refresh request sends your Client ID and Client Secret in the Authorization header, matching the initial token exchange. For Custom Auth connections, Integrate.io derives the token expiry from the provider response in this order:
  1. An expires_in field (in seconds) in the token response
  2. An explicit expires_at field in the token response
  3. The exp claim on a JWT access token
  4. A default of one hour if the provider returns none of the above
The background refresh worker and the pre-import refresh both use this expiry to re-mint the token before it is used, so Custom Auth connections are refreshed automatically even when the provider does not return an explicit expiry.
Note:Some providers (like GitHub OAuth Apps) don’t provide refresh tokens. In these cases, you may need to re-authenticate when the token expires.

Reconnecting an existing connection

Use Reconnect when a connection’s refresh token has been revoked, expired, or had its scopes changed at the provider. Reconnect reuses the saved Client ID, Client Secret, Authorization URL, Token URL, scope, and Additional Authorization Parameters, then opens the provider’s consent screen to issue a fresh set of tokens. The values in Additional Authorization Parameters are forwarded to the provider on reconnect. For Google and other providers that only return a refresh_token when explicitly asked, set:
Additional Authorization Parameters
Without access_type=offline&prompt=consent, Google skips the consent screen on reconnect and does not return a new refresh_token. The connection keeps the previously stored refresh token, and if that token has been revoked, the next refresh fails with invalid_grant. If you edit Additional Authorization Parameters in the connection form, the new value is used for the current reconnect even before you save.

Troubleshooting

Common Issues

Testing Your Connection

Universal OAuth connections are tested by calling a Test Endpoint URL that you configure on the connection. Integrate.io sends an authenticated request to that URL using the connection’s current token and reports success only when the provider returns a successful response. A Test Endpoint URL is required for every Universal OAuth authentication method (OAuth 2.0, Client Credentials, and Custom Auth). If the field is empty, the Test Connection button is disabled and the V2 API test endpoint returns an error. To configure it:
1

Open the connection

Edit the Universal OAuth connection you want to test.
2

Set the Test Endpoint URL

Under Connection Test Settings, enter a URL that requires authentication and returns a successful response for a valid token (for example, a user profile or account info endpoint).
3

Save and test

Save the connection, then click Test Connection. A green check indicates the provider accepted the token.
Behavior for Custom Auth
  • If the Test Connection request runs after the token’s expiry, Integrate.io re-mints the token using your Custom Auth configuration before calling the Test Endpoint URL. The re-minted token is persisted, matching the behavior of scheduled jobs.
  • When you click Reconnect and then Test Connection before saving, the new (pending) token is used for the test. Saving the connection persists it. If the pending token is malformed or has already expired, Integrate.io falls back to the stored token.
You can also validate a connection end-to-end by using it in a REST API Source component and running a preview.

Supported Providers

Universal OAuth works with any OAuth 2.0 compliant provider. Here are some commonly used services:
  • Google (Analytics, Sheets, Drive)
  • GitHub
  • GitLab
  • Slack
  • Salesforce
  • HubSpot
  • Shopify
  • Stripe
  • Dropbox
  • Box
  • Microsoft (Azure, Office 365)
  • Zoom
  • Twitch
  • Spotify
  • QuickBooks
  • Zendesk
  • Notion (requires Use HTTP Basic Authentication for token exchange)
  • And many more…
For providers not listed, you can configure Universal OAuth manually using the provider’s OAuth documentation.

Security Best Practices

  • Keep secrets confidential - Never share your Client Secret or access tokens
  • Use minimal scopes - Only request the permissions your integration actually needs
  • Regularly review connections - Remove unused connections to minimize security exposure
  • Monitor for unauthorized access - Check your provider’s security logs for suspicious activity
Last modified on October 27, 2026