OAuth 2.0 documentation: Framework, Standard
OAuth 2.0 is an increasingly common server API authorization protocol. In fact, many built-in integrator.io connections already gain access via OAuth 2.0, and it has become required or preferred by providers like Google, eBay, and Microsoft.
You can select this option to connect to any OAuth 2.0-compliant app that does not have a standard integrator.io connection, or you can build your own OAuth 2.0 connection for a supported app and exercise finer control over each setting, as described below:
Contents
- A. Set up an HTTP connection
- B. Provide general HTTP connection settings
- C. Edit OAuth 2.0 settings
- D. Edit common HTTP settings
- E. Save, test, and authorize
A. Set up an HTTP connection
Start establishing the universal, or generic, HTTP connection in either of the following ways:
- Select Connections from the Resources menu.
Next, click + Create connection at the top right. In the resulting Create source panel, select HTTP from the Application list, under the Universal connectors group.

- While working in a new or existing integration, you can add an application to a flow simply by clicking Add source or Add destination/lookup. From the Application list, under Universal connectors, select HTTP.
- After the HTTP Application is added, click the Connection setting’s + button to proceed.

B. Provide general HTTP connection settings

Name (required): Provide a clear and distinguishable name. Throughout integrator.io imports and exports, you will have the option to choose this new connection, and a unique identifier will prove helpful later when selecting among a list of connections that you’ve created.
Application (required, non-editable): A reminder of the app you’re editing.
Mode (required): Select one of the following options:
- Cloud to connect to a publicly accessible server application
- On-premise to connect to a server that is publicly inaccessible and has integrator.io agent installed on it
Agent (required, if On-premise selected for Mode; otherwise not displayed): Select an agent from the list. To connect to an on-premise application, integrator.io requires that an agent be installed on a networked computer. An agent is a small application that allows you to connect to data behind your firewall. When installing an agent, you will specify a unique access token, which then populates the Agent drop-down list. The installed agents connect to integrator.io and establish a reverse SSH tunnel, allowing secure communication without the need to whitelist integrator.io IP addresses in your firewall settings. A single agent can be used by multiple different connections.
C. Edit OAuth 2.0 settings
Continuing in the Create connection panel, select OAuth 2.0 for the Auth type. The settings then become specific to OAuth 2.0.
As with all universal API connections, the parameters are unique to the vendor’s conventions. Before proceeding, review the developer documentation and your account settings.

OAuth 2.0 client (required): Select the client pair that stores the client ID and client secret provided to you by your app. To add an iClient and configure your credentials, click the plus (+) button. Click the edit ( ) button to modify a selected client. Be sure to give the client a recognizable name for use in any other connections.
Grant type (required): You can use the Authorization code to get an access token for web and native apps after you authorize the app, or Client credentials for apps to request an access token on their own behalf.
- Authorization code – the provided code is obtained by using an authorization server as an intermediary between the client, integrator.io, and resource owner. Selecting Authorization code enables additional required and informational settings.
- Client credentials – limits the authorization scope to the protected resources under control of the client, or to protected resources previously arranged with the authorization server. Selecting Client credentials exposes one additional required setting.

Authorization URL (required): Enter the endpoint for the API provider’s authorization server where the authorization code is retrieved.
Redirect URL (not editable): Click the copy button ( ) to provide to your authorization server to exchange secure messages after authentication. You must whitelist this URL with your authorization server.
Scope (optional): List the scopes to grant access to authorization server requests. Separate multiple scopes with a space character, unless you are providing an alternative delimiter, below.

Send client credentials via (required): Select an option to send basic auth credentials in the header or client credentials in the body of the request.
Override HTTP status code for auth errors (optional): Provide an alternate status code if the HTTP status code for auth errors returned by this app is not the standard 401. For example, for an API that returns a generic 400 status code, enter 400 and then specify the field in the HTTP response body that indicates auth errors.
Path to auth error field in HTTP response body (optional): If the API returns a field that contains auth errors in the HTTP response body, enter the JSON path to that field. For example, when an API returns the field errorMessage
with the value Auth failed
, then enter errorMessage
as the path.
Auth error values (optional): If you supplied a fail path above, enter the exact values that the API will return to indicate auth errors. Separate multiple values with commas.
OAuth 2.0 overrides
This section is collapsed by default, since all of its settings are optional.

Override default scope delimiter (optional, enabled when Authorization code selected): If you are requesting access to more than one scope and the authorization server expects the list to be delimited by a space character, enter a custom delimiter.
Override access token HTTP headers (optional): Enter a name and a value to replace default header values with custom values. In rare cases, it may be necessary to include custom HTTP headers with your API requests. The default content-type header value is application/x-www-form-urlencoded.
Override access token HTTP request body (optional): Configure your own access token body in JSON format if it is different from the default access token body. Click the handlebars () button to open the Advanced field editor and create or edit a template.
This JSON format is finally converted to the form-urlencoded format on the wire.
- Default access token format for Send client credentials via set to body:
{ code: {{{query.code}}}, redirect_uri: {{{redirectUri}}}, client_id: {{{clientId}}}, client_secret: {{{clientSecret}}}, grant_type: "authorization_code"}
- Default access token format for Send client credentials via set to header:
{ client_id: {{{clientId}}}, client_secret: {{{clientSecret}}}, grant_type: "client_credentials" }
Override refresh token HTTP headers (optional, enabled when Authorization code selected): In some cases, it may be necessary to include custom HTTP headers with your token refresh requests. Any value from the connection can be referenced using handlebars {{{placeholders}}}, such as a complete path within a connection setting.
Override refresh token HTTP request body (optional, enabled when Authorization code selected): If the service you’re connecting to supports requests to obtain or refresh existing tokens, enter the body to use in the request token call. Click the handlebars () button to open the Advanced field editor and create or edit a template. Typically, a username/password or refresh token would be used in the request. You may use handlebars placeholders to reference any connection fields. You can store these values in the encrypted field or, if not sensitive, the unencrypted field– for example,
{{connection.http.encrypted.password}}
.
- Default refresh token body format:
{
client_id: {{{clientId}}},
client_secret: {{{clientSecret}}},
"grant_type": "client_credentials",
"refresh_token": "{{{connection.http.auth.token.refreshToken}}}"
}
Override revoke token HTTP headers (optional): In rare cases, you may need to include custom HTTP headers with your API requests. The default content-type header value is application/x-www-form-urlencoded, and the authorization header value is basic. Enter a name and a value (or multiple name-value pairs) to replace default token headers with custom values.
Override revoke token HTTP request body (optional): Configure your own revoke body in JSON format if it is different from the default revoke token body. Click the handlebars () button to open the Advanced field editor and create or edit a template. You may use handlebars placeholders to reference any connection fields. This JSON format is converted to form-urlencoded format on the wire.
- Default revoke body format:
{ token: {{{connection.http.auth.token.token}}} }
Configure token auth
This section is expanded by default, since it contains a required setting.
Send token via (required): Select the location where your API expects to find the authentication token:
- HTTP body – The API requires the token to be embedded in the body structure of your HTTP request. In such cases, place the token in your body template using the handlebars placeholder
{connection.http.token.token}
. - HTTP header – Allows you to specify the header name and authentication scheme to use when constructing the HTTP request.
- URL parameter – The authentication token is located in the URL. Specify the query string parameter name that holds the token value.

Header name (required, enabled when Send token via is set to HTTP header): Enter the header field name that contains the token, if the API expects a field other than Authorization.
Header scheme (optional): Select an HTTP authorization header scheme value. For example, Bearer would be the scheme value for Authorization: Bearer my_secret_api_token.

Parameter name (required, enabled when Send token via is set to URL parameter): Specify the name of the URL parameter that holds the API token value. For example, if you enter myAPITokenURLParam, then all HTTP requests will be sent in the format ?myAPITokenURLParam=<token>
.
D. Edit common HTTP settings
Additional HTTP settings are found in the other sections in the Create connection pane (optional sections are collapsed by default):
- Application details (contains the required settings Base URI and Media type)
- Nonstandard API rate limiter
- How to test this connection?
- Advanced
For complete documentation of these settings, see Fundamentals of HTTP connections.
E. Save, test, and authorize
Once you have configured the OAuth 2.0 HTTP connection, you have a few options for continuing:
- Save & authorize – click this button to test the connection, commit the new connection so that it will be available to all integrations for your account (and applied to the current source or destination app, if you created it within a flow)
- Close – click this link to exit connection creation without saving
- Test connection – click this button to verify that your new connection is free of errors
When you request Save & authorize, a new browser window opens to ask you to grant access to integrator.io for the specified scopes. If you allow the request, the refresh token is stored within this connection.
Comments
0 comments
Please sign in to leave a comment.