HTTP Create or close HTTP session function

Create or close a named HTTP session with persistent cookies, auth, and retry config.

Help CentreBuilding 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:

  1. Navigate to the process where you would like to add the Create or close HTTP session function
  2. Click on the green button's drop-down (right side of the green button labelled "Process")
  3. On the menu that appears, click on the "+ Activity" item
  4. From here you can select the Create or close HTTP session option
  5. Click "Add" once you are done

Input parameters

ParameterRequiredTypeDefaultDescription
ActionNoSelect (create / close)createWhether to create a new session or close an existing one
NameNoTextdefaultA unique alias for the session
Base URLNoText-A base URL that is prepended to all request URLs in this session
HeadersNoJSON-Default headers to include with every request in this session
AuthNoSelect (basic / bearer / api_key / oauth2_cc)-The authentication method to use
ProxyNoText-A proxy URL to route requests through
TimeoutNoNumber30Default timeout in seconds for requests in this session
VerifyNoBooleantrueWhether to verify SSL/TLS certificates
CertNoText-Path to a client certificate file for mutual TLS
RetryNoJSON-Retry configuration with max_retries, backoff_factor, and retry_on status codes
Rate limitNoNumber0Maximum requests per second (0 = unlimited)

Output variables

This action does not produce output variables.


Errors

ErrorDescription
Invalid auth configThe authentication configuration is incomplete or invalid
OAuth2 token failedUnable 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

Related functions

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.