HTTP
The HTTP app provides various modules for communication based on Hypertext Transfer Protocol (HTTP). HTTP is the foundation of data communication for the World Wide Web. The modules enable you to download web pages and files, call webhooks and API endpoints, etc.
Getting Started with HTTP
The right choice of the module depends on the authentication/authorization mechanism the resource you wish to access employs:
- Make a request - universal module primarily intended for resources not employing any type of authentication/authorization
- Make a Basic Auth request - for resources employing HTTP Basic Authentication (BA)
- Make an OAuth 2.0 request - for resources employing OAuth 2.0 authorization protocol
- Make a Client Certificate Auth request - for resources employing an authorization protocol that requires a client-side certificate
- Get a file - to download a file from the specified URL
- Resolve a target URL - to retrieve a target URL from the chain of HTTP redirections
- Retrieve headers - to return headers (name and value) from the specified HTTP request module in separate bundles.
Make a Request
A universal module that enables you to configure an HTTP request and submit it to a server. The received HTTP response is then contained in the output bundle.
Evaluate all states as errors (except for 2xx and 3xx) | Use this option to set up error handling. | ||||||||||
URL | Enter a URL you want to send a request to, e.g., API endpoint, website, etc. | ||||||||||
Method | Select the HTTP method you want to use: GET POST PUT PATCH DELETE | ||||||||||
Headers | Enter the desired request headers. For example, an authorization. By default, the request does not contain the Accept header. If an unexpected response is returned, try adding the Accept: */* header.![]() | ||||||||||
Query String | Enter the desired query key-value pairs. | ||||||||||
Body type | HTTP Body is the data bytes transmitted in an HTTP transaction message immediately following the headers if there are any to be used.
| ||||||||||
Parse response | Enable this option to automatically parse responses and convert JSON and XML responses so you don't need to use JSON > Parse JSON or XML > Parse XML modules. | ||||||||||
User name | Enter the user name if you want to send a request using the basic auth. | ||||||||||
Password | Enter the password if you want to send a request using the basic auth. | ||||||||||
Timeout | Specify the request timeout in seconds (1-300). Default: 40 seconds. | ||||||||||
Share cookies with other HTTP modules | Enable this option to share cookies from the server with all HTTP modules in your scenario. | ||||||||||
Self-signed certificate | Upload your certificate if you want to use TLS using your self-signed certificate. For more details about inserting the certificate, refer to the Certificates and Keys article. | ||||||||||
Reject connections that use unverified (self-signed) certificates | Enable this option to reject connections that use unverified TLS certificates. | ||||||||||
Follow redirect | Follows the URL redirections with 3xx responses. | ||||||||||
Follow all redirect | Follows the URL redirections with all response codes. | ||||||||||
Disable serialization of multiple same query string keys as arrays | By default, Integromat handles multiple values for the same URL query string parameter key as arrays (e.g., www.test.com?foo=bar&foo=baz will be converted to www.test.com?foo[0]=bar&foo[1]=baz ). To disable this feature, activate this option. | ||||||||||
Request compressed content | Enable this option to request a compressed version of the website. Adds an Accept-Encoding header to request compressed content. |
Example
Shows how to set up the module to submit a POST request with JSON payload:
Make a Basic Auth Request
A module that enables you to configure an HTTP request with HTTP Basic authentication and submit it to a server. The received HTTP response is then contained in the output bundle.
Credentials | Click the Add button to add your credentials (user name and password) for basic authentication. You can add more credentials to easily switch between each connection. | ||||||||||
Evaluate all states as errors (except for 2xx and 3xx ) | Use this option to set up error handling. | ||||||||||
URL | Enter a URL you want to send a request to, e.g., API endpoint, website, etc. | ||||||||||
Method | Select the HTTP method you want to use: GET POST PUT PATCH DELETE | ||||||||||
Headers | Enter the desired request headers. For example, an authorization. By default, the request does not contain the | ||||||||||
Query String | Enter the desired query key-value pairs. | ||||||||||
Body type | HTTP Body is the data bytes transmitted in an HTTP transaction message immediately following the headers if there are any to be used.
| ||||||||||
Parse response | Enable this option to automatically parse responses and convert JSON and XML responses so you don't need to use JSON > Parse JSON or XML > Parse XML modules. | ||||||||||
Timeout | Specify the request timeout in seconds (1-300). Default: 40 seconds. | ||||||||||
Share cookies with other HTTP modules | Enable this option to share cookies from the server with all HTTP modules in your scenario. | ||||||||||
Self-signed certificate | Upload your certificate if you want to use TLS using your self-signed certificate. For more details about inserting the certificate, refer to the Certificates and Keys article. | ||||||||||
Reject connections that are using unverified (self-signed) certificates | Enable this option to reject connections that are using unverified TLS certificates. | ||||||||||
Follow redirect | Follows the URL redirections with 3xx responses. | ||||||||||
Follow all redirect | Follows the URL redirections with all response codes. | ||||||||||
Disable serialization of multiple same query string keys as arrays | By default, Integromat handles multiple values for the same URL query string parameter key as arrays (e.g., www.test.com?foo=bar&foo=baz will be converted to www.test.com?foo[0]=bar&foo[1]=baz ). To disable this feature, activate this option. | ||||||||||
Request compressed content | Enable this option to request a compressed version of the website. Adds an Accept-Encoding header to request compressed content. |
Make an OAuth 2.0 Request
In order to make an HTTP(S) request to servers that require an OAuth 2.0 authorization, you need to create an OAuth connection first.
Creating a Connection
Create an OAuth client in the target service with which you want Integromat to communicate. This option is most likely to be found in the Developer section of the given service. When creating the client, you will be asked to specify a so-called
Redirect URL
(sometimes called aCallback URL
).
Use the following Redirect URL:https://www.integromat.com/oauth/cb/oauth2
.Once you have created the client in the 3rd party service, the given service will display two keys:
Client ID
andClient Secret
. Some services call theseApp Key
andApp Secret
. Make sure you save these keys. You will be asked to provide them when creating the connection in Integromat.Find the
Authorize URI
andToken URI
in the API documentation of the given service (if the service uses implicit flow, you will need onlyAuthorize URI
). These are URL addresses through which Integromat communicates with the target service. The addresses serve for OAuth authorization.Examples of Yahoo addresses:
- Authorize URI:
https://api.login.yahoo.com/oauth2/request_auth
- Token URI:
https://api.login.yahoo.com/oauth2/get_token
- Authorize URI:
If the target service uses scopes (access rights), check how the service separates individual scopes, and make sure you set the Scope separator in the connection advanced settings (see below) accordingly.
Once you have completed the steps above, you can proceed with setting up the module:
Connection | Click the Add button to set up the OAuth 2.0 connection for the request.
| ||||||||||||||||||||||||||||||
Evaluate all states as errors (except for 2xx and 3xx ) | Use this option to set up error handling. | ||||||||||||||||||||||||||||||
URL | Enter a URL you want to send the request to, e.g., API endpoint, website, etc. | ||||||||||||||||||||||||||||||
Method | Select the HTTP method you want to use: GET POST PUT PATCH DELETE | ||||||||||||||||||||||||||||||
Headers | Enter the desired request headers. For example, an authorization. By default, the request does not contain the | ||||||||||||||||||||||||||||||
Query String | Enter the desired query key-value pairs. | ||||||||||||||||||||||||||||||
Body type | HTTP Body is the data bytes transmitted in an HTTP transaction message immediately following the headers if there are any to be used.
| ||||||||||||||||||||||||||||||
Parse response | Enable this option to automatically parse responses and convert JSON and XML responses so you don't need to use JSON > Parse JSON or XML > Parse XML modules. | ||||||||||||||||||||||||||||||
Timeout | Specify the request timeout in seconds (1-300). Default: 40 seconds. | ||||||||||||||||||||||||||||||
Share cookies with other HTTP modules | Enable this option to share cookies from the server with all HTTP modules in your scenario. | ||||||||||||||||||||||||||||||
Self-signed certificate | Upload your certificate if you want to use TLS using your self-signed certificate. For more details about inserting the certificate, refer to the Certificates and Keys article. | ||||||||||||||||||||||||||||||
Reject connections that use unverified (self-signed) certificates | Enable this option to reject connections that use unverified TLS certificates. | ||||||||||||||||||||||||||||||
Follow redirect | Follows the URL redirections with 3xx responses. | ||||||||||||||||||||||||||||||
Follow all redirect | Follows the URL redirections with all response codes. | ||||||||||||||||||||||||||||||
Disable serialization of multiple same query string keys as arrays | By default, Integromat handles multiple values for the same URL query string parameter key as arrays (e.g., www.test.com?foo=bar&foo=baz will be converted to www.test.com?foo[0]=bar&foo[1]=baz ). To disable this feature, activate this option. | ||||||||||||||||||||||||||||||
Request compressed content | Enable this option to request a compressed version of the website. Adds an Accept-Encoding header to request compressed content. |
Make a Client Certificate Auth Request
Makes an HTTP(S) request to servers that require a client certificate authorization.
Credentials | Click the Add button to add your credentials (certificate) for client certificate authorization. Provide the certificate you want to use for authorization. For more details about inserting a certificate, refer to the Certificates and Keys article. | ||||||||||
Evaluate all states as errors (except for 2xx and 3xx ) | Use this option to set up error handling. | ||||||||||
URL | Enter a URL you want to send a request to, e.g., API endpoint, website, etc. | ||||||||||
Method | Select the HTTP method you want to use: GET POST PUT PATCH DELETE | ||||||||||
Headers | Enter the desired request headers. For example, an authorization. By default, the request does not contain the | ||||||||||
Query String | Enter the desired query key-value pairs. | ||||||||||
Body type | HTTP Body is the data bytes transmitted in an HTTP transaction message immediately following the headers if there are any to be used.
| ||||||||||
Parse response | Enable this option to automatically parse responses and convert JSON and XML responses so you don't need to use JSON > Parse JSON or XML > Parse XML modules. | ||||||||||
Timeout | Specify the request timeout in seconds (1-300). Default: 40 seconds. | ||||||||||
Share cookies with other HTTP modules | Enable this option to share cookies from the server with all HTTP modules in your scenario. | ||||||||||
Self-signed certificate | Upload your certificate if you want to use TLS using your self-signed certificate. For more details about inserting the certificate, refer to the Certificates and Keys article. | ||||||||||
Reject connections that are using unverified (self-signed) certificates | Enable this option to reject connections that are using unverified TLS certificates. | ||||||||||
Follow redirect | Follows the URL redirections with 3xx responses. | ||||||||||
Follow all redirect | Follows the URL redirections with all response codes. | ||||||||||
Disable serialization of multiple same query string keys as arrays | By default, Integromat handles multiple values for the same URL query string parameter key as arrays (e.g., www.test.com?foo=bar&foo=baz will be converted to www.test.com?foo[0]=bar&foo[1]=baz ). To disable this feature, activate this option. | ||||||||||
Request compressed content | Enable this option to request a compressed version of the website. Adds an Accept-Encoding header to request compressed content. |
Get a File
Downloads a file from the specified URL.
URL | Enter the URL of the file you want to download. After the file is downloaded, you can further process the file (map the file data) using other modules in the scenario. |
Resolve a Target URL
Resolve the HTTP redirects and returns the target URL.
URL | Enter the URL you want to resolve, e.g., https://bit.ly/2FbUoRt |
Method | Select the method you want to use. |
Iterators
Retrieve Headers
Returns each header (name and value) from the specified HTTP module in the separate bundle.
Source Module | Select the module you want to retrieve headers from. |
Related articles
Generating JSON Web Tokens (JWT)
It is possible to generate a JWT token using the HS256 algorithm with the help of built-in functions:
Header:
Code for copy&paste:
{{replace(replace(replace(base64("{""alg"":""HS256"",""typ"":""JWT""}"); "/=/g"; emptystring); "/\+/g"; "-"); "/\//g"; "_")}}
Payload:
Code for copy&paste:
{{replace(replace(replace(base64("{""iss"":""key"",""exp"":" + (timestamp + 60) + "}"); "/=/g"; emptystring); "/\+/g"; "-"); "/\//g"; "_")}}
Token:
Code for copy&paste:
{{11.header}}.{{12.payload}}.{{replace(replace(replace(sha256(11.header + "." + 12.payload; "base64"; 16.secret); "/=/g"; emptystring); "/\+/g"; "-"); "/\//g"; "_")}}