Basic authentication documentation: Standard
You can build integrations with apps that use REST API, even if the connection is not already provided by integrator.io.
Important: A better alternative, with similar functionality and additional settings, is the universal HTTP connector. We recommend starting with that option or switching to it if you run into errors with a REST API connection.
Before creating the connection, review your app’s API guide. It will provide the information you need, such as the kind of authentication that the app requires and its URI. Every app puts its documentation – guides and reference material – in different places. You can often find it by searching for “API guide” or “API documentation” on the company’s website.
Tip: Some companies put their documentation on third-party sites. If you can’t find the guide on their website, you can also try a web search.
- A. Set up an REST connection
- B. Provide general REST connection settings
- C. Edit basic auth settings
- D. Edit common REST settings
- E. Save, test, and authorize
A. Set up a REST API connection
Start establishing the universal, or generic, REST API 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 REST API from the Application list, under the Universal connectors group.
B. Provide general REST 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 application details
Base URI (required): Enter the common part of the API’s URL to be used across all of the HTTP endpoints you invoke.
Configure HTTP headers (optional): In some rare cases, you may need to include custom HTTP headers with your API requests. integrator.io automatically adds the appropriate content-type header based on the mediaType value described in the connection associated with this request (typically application/json). Note that the request header value automatically includes the authentication method described in the associated connection if required. Use this header field in the rare case when an API requires additional headers other than application or JSON.
Media type (required): Specify the data format to use in the HTTP request body and HTTP response body.
D. Edit basic auth settings
Continuing in the Create connection pane, at a minimum you must provide your username and password to establish a connection with basic authentication.
Auth type (required): Select Basic if your service implements the HTTP basic authentication strategy. (Cookie-based, custom, and token authentication are treated separately.) This authentication method adds Base64-encoded username and password values in the Authentication HTTP request header.
Username (required): Enter the basic authentication username for the server.
Password (required): Enter the password. Multiple layers of protection are in place, including AES 256 encryption, to keep your password safe.
E. Test and save the connection
HTTP method (optional): Select the HTTP method to use when making the ping request.
Relative URI (required): Enter the relative URI to a specific resource, as documented in your app’s API guide. (The ping URI is relative to the base URI.) This field is required for testing the connection.
Path to success field in HTTP response body (optional): Provide the location of custom error codes, as documented in the error schema in your app’s API guide.
A success path is necessary only if your app returns errors outside of the standard 4xx and 5xx status codes. For example, Slack sets a field in the response body and returns a 200 HTTP status code, whether or not the ping HTTP request failed. In such cases, for the Ping success path value, you can specify the JSON path of a field in the response body that should instead be used to determine if a ping request succeeded. For example, if you are building a connection to the Slack API, set this field to ok (see Slack API docs for more info).
Success values (optional): Enter the values to test whether a connection succeeded. This optional field is used in conjunction with the Ping success path field. The value found in the HTTP response at the path provided is compared against this list of success values. If there is an exact case-sensitive match of any of the values, then the request is considered successful.
Click Test connection to try connecting before you save these values. If the connection fails, double-check the provided settings, and test again.