Watch the walkthrough
Call an external HTTP API from a workflow and use the response.
Recorded with an earlier Twidget interface. Names, control locations and available options may differ; use the linked documentation for current guidance.
Watch tutorial (3:00)
Browse all video tutorials
Using Twidget, you can send external HTTP requests effortlessly. This functionality allows you to communicate with external servers or APIs. Below, you will find the necessary parameters and structure to set up an HTTP request.
Parameters
URL: The endpoint to which the request will be sent.
Method: The HTTP method (GET, POST, PUT, DELETE, etc.).
Parameters: Key-value pairs appended to the URL in the format key=value.
Headers: Metadata sent with the request, structured as key-value pairs.
Body: Data sent with the request. Applicable for methods like POST and PUT.
Timeout: The duration before the request times out, specified in seconds.
Import a request example
If a service provides a cURL example, open the request editor and select Import cURL. Paste the example into cURL command, then select Import into request.
This credential-free example imports a POST request with a query parameter and a small JSON body.

After import, the URL, POST method and limit query parameter appear in their corresponding editor fields.

Review the imported URL, method, parameters, headers and body before saving. Import fills the editor without sending the request. It replaces those request fields while keeping the selected account, response type and return name. The timeout is kept unless the example supplies a maximum time.
Use a standard quoted example rather than a script or a file upload command. Unsupported examples show an error. Remove real passwords or tokens from examples before sharing them, and choose your configured credentials when preparing the request.
Response Structure
The response of the request will be stored as a variable with the following schema:
{
"status": number,
"status_text": text,
"headers": {object},
"data": {object}
}
status: The HTTP status code returned by the server.
status_text: Textual representation of the HTTP status code.
headers: Headers returned in the response.
data: The body of the response, usually in JSON format.
By following the structure and examples provided, you can easily configure and send HTTP requests using Twidget, as well as handle and process the responses.