Help Centre › Building Processes
This article describes the RPA HTTP functionality to create or close an HTTP session.
For a full list of available functions, please read HTTP functions.
Description
The Create or close HTTP session function manages named HTTP sessions with persistent cookies, headers, authentication, and retry configuration. Sessions allow you to reuse connection settings across multiple HTTP requests without repeating configuration.
Setting it up
To use the Create or close HTTP session function, follow these instructions:
{{popups:rpas/add:action=api-session}}
Once on a process map:
- Navigate to the process where you would like to add the Create or close HTTP session function
- Click on the green button's drop-down (right side of the green button labelled "Process")
- On the menu that appears, click on the "+ Activity" item
- From here you can select the Create or close HTTP session option
- Click "Add" once you are done
Input parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| Action | No | Select (create / close) | create | Whether to create a new session or close an existing one |
| Name | No | Text | default | A unique alias for the session |
| Base URL | No | Text | - | A base URL that is prepended to all request URLs in this session |
| Headers | No | JSON | - | Default headers to include with every request in this session |
| Auth | No | Select (basic / bearer / api_key / oauth2_cc) | - | The authentication method to use |
| Proxy | No | Text | - | A proxy URL to route requests through |
| Timeout | No | Number | 30 | Default timeout in seconds for requests in this session |
| Verify | No | Boolean | true | Whether to verify SSL/TLS certificates |
| Cert | No | Text | - | Path to a client certificate file for mutual TLS |
| Retry | No | JSON | - | Retry configuration with max_retries, backoff_factor, and retry_on status codes |
| Rate limit | No | Number | 0 | Maximum requests per second (0 = unlimited) |
Output variables
This action does not produce output variables.
Errors
| Error | Description |
|---|---|
| Invalid auth config | The authentication configuration is incomplete or invalid |
| OAuth2 token failed | Unable to obtain an OAuth2 access token with the provided client credentials |
Tips
- Use sessions for APIs that require authentication – the auth token is automatically included in every request
- Set base_url to avoid repeating the API host in every request URL (e.g. "https://api.example.com/v1")
- Configure retry for flaky APIs – set max_retries, backoff_factor, and retry_on status codes
- Set rate_limit to stay within API rate limits and avoid being throttled