External API Request / cURL Commands


In this guide, we'll explore how to make external API requests in Xano, a no-code platform that allows you to build and deploy backend services without writing code. By leveraging the External API Request feature, you can easily integrate with third-party services and leverage their functionality and data within your applications.

What is an External API Request?

An External API Request is a function in Xano that allows you to make HTTP requests to external APIs or third-party services. This feature enables you to fetch data, send data, or perform various operations by connecting to external resources. It's a powerful tool that simplifies the integration process, making it accessible to both non-technical users and developers.

Setting Up an External API Request

To get started, follow these steps:

  1. In your Xano project, add the "External API Request" function to your function stack.
  2. If you have a cURL command provided by the third-party service, click the "Import cURL" button and paste the cURL command. Xano will automatically populate the necessary fields for you.
  3. If you don't have a cURL command, manually enter the required information:
  • URL: The location of the resource you want to access.
  • Method: The HTTP method you want to use (GET, POST, PUT, DELETE, etc.).
  • Parameters: Key-value pairs required by the third-party service to fetch the desired data.
  • Headers: Additional headers, such as content type or authorization headers.
  • Timeout: The maximum time (in seconds) to wait for the API response before timing out.
  • Follow Location: Whether to follow redirects (301 or 302 responses) or not.

Working with Parameters and Dynamic Data

In the "Parameters" field, you can input JSON data directly or use dynamic values. If you paste JSON data, Xano will prompt you to choose whether you want to use raw JSON or apply filters. Choosing filters allows you to make the API request dynamic by replacing values with inputs or variables.

For example, let's say you want to send an email using an external service like SendGrid. You can paste the JSON payload provided by SendGrid's documentation into the "Parameters" field. Then, you can make parts of the payload dynamic by selecting values and replacing them with inputs or variables from your Xano project.

Handling Authentication and Security

Xano provides several security options to ensure secure communication with third-party services:

  1. Host Verification: Enforces that the requested host matches the SSL certificate.
  2. Peer Verification: Uses a trusted authority to verify the authenticity of the SSL certificate.
  3. SSL Authentication: Accepts text input for SSL authentication, typically provided by the third-party service.
  4. CA Certificate: Accepts text input for the CA certificate, also provided by the third-party service.

To use SSL authentication or a CA certificate, open the respective files on your computer, copy the text content (typically between "BEGIN PRIVATE KEY" and "END PRIVATE KEY"), and paste it into the corresponding text input fields in Xano.

Testing and Debugging

Once you've set up your External API Request, you can test it by running the function within your Xano project. The response from the third-party service will be displayed in the "Output" tab, including headers and the result data.

If you encounter any issues or need further assistance, you can reach out to the Xano support team by clicking the left sidebar and accessing the support chat or community forum.

By following this guide, you'll be able to leverage the power of external APIs and third-party services, enhancing your applications with additional functionality and data sources without writing a single line of code.

This transcript was AI generated to allow users to quickly answer technical questions about Xano.

Was this helpful?

I found it helpful

I need more support
Sign up for XanoSign up for Xano

Build without limits on a secure, scalable backend.

Unblock your team’s progress and create a backend that will scale for free.

Start building for free