> ## Documentation Index
> Fetch the complete documentation index at: https://nango-scrips-ref.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Proxy requests an API

> Step-by-step guide on how to proxy requests to an API (using the _proxy_).

<Info>
  Pre-requisite: creation of an integration and at least one connection ([step-by-step guide](/integrate/guides/authorize-an-api)).
</Info>

The [Proxy](/understand/concepts/proxy) lets you query external APIs easily with credentials injection, request logging, and pre-configurations for base URLs, rate-limits, retries, etc.

Here is an example of how to query external APIs with the proxy, using the SDK ([reference](/reference/sdks/node#proxy-get-requests)) and API ([reference](/reference/api/proxy/get)):

<Tabs>
  <Tab title="Node">
    ```typescript
    try {
        const res = await nango.proxy({
            method: 'POST',
            baseUrlOverride: 'https://api.example.com',
            endpoint: '/external-endpoint',
            providerConfigKey: '<string>',
            connectionId: '<string>',
            retries: 5, // Retries with exponential backoff (optional, default 0)
            data: {
                id: 1,
                colorId: 'blue',
                selected: true
            }
        });

        // Response was 200!
        // See https://axios-http.com/docs/res_schema
        console.log(res.data);
    } catch (error) {
        // Status of response != 200
        // See https://axios-http.com/docs/handling_errors
        console.log(error.response.data);
        console.log(error.response.status);
        console.log(error.response.headers);
    }
    ```
  </Tab>

  <Tab title="REST API">
    ```bash
    curl -X POST -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer <NANGO-SECRET-KEY>' \
    -H 'Provider-Config-Key: <INTEGRATION-ID>' \
    -H 'Connection-Id: <CONNECTION-ID>' \
    -d '{"colorId: "blue"}' \
    'https://api.nango.dev/proxy/<API-ENDPOINT>'
    ```
  </Tab>
</Tabs>

<Tip>
  **Questions, problems, feedback?** Please reach out in the [Slack community](https://nango.dev/slack).
</Tip>
