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

# Tailscale (OAuth)

> Access the Tailscale API in 2 minutes 🔗

<Tabs>
  <Tab title="🚀 Quickstart">
    <Steps>
      <Step title="Create an integration">
        In Nango ([free signup](https://app.nango.dev)), go to [Integrations](https://app.nango.dev/dev/integrations) -> *Configure New Integration* -> *Tailscale (OAuth)*.
      </Step>

      <Step title="Authorize Tailscale (OAuth)">
        Go to [Connections](https://app.nango.dev/dev/connections) -> *Add Test Connection* -> *Authorize*, then enter your Tailscale credentials. Later, you'll let your users do the same directly from your app.
      </Step>

      <Step title="Call the Tailscale API">
        Let's make your first request to the Tailscale API (fetch a list of all users). Replace the placeholders below with your [Environment API key](/docs/reference/backend/http-api/api-keys), [integration ID](https://app.nango.dev/dev/integrations), and [connection ID](https://app.nango.dev/dev/connections):

        <Tabs>
          <Tab title="cURL">
            ```bash theme={null}
            curl -X GET "https://api.nango.dev/proxy/v2/tailnet/{connectionConfig.organizationName}/users" \
              -H "Authorization: Bearer <NANGO-API-KEY>" \
              -H "Provider-Config-Key: <INTEGRATION-ID>" \
              -H "Connection-Id: <CONNECTION-ID>" 
            ```
          </Tab>

          <Tab title="Node">
            Install Nango's backend SDK with `npm i @nangohq/node`. Then run:

            ```typescript theme={null}
            import { Nango } from '@nangohq/node';

            const nango = new Nango({ apiKey: '<NANGO-API-KEY>' });

            const res = await nango.get({
              endpoint: '/v2/tailnet/{connectionConfig.organizationName}/users',
              providerConfigKey: '<INTEGRATION-ID>',
              connectionId: '<CONNECTION-ID>'
            });

            console.log(res.data.users);
            ```
          </Tab>
        </Tabs>

        Or fetch credentials dynamically via the [Node SDK](/docs/reference/backend/backend-sdk/node#get-a-connection-with-credentials) or [API](/docs/reference/backend/http-api/connections/get).

        <Note>
          The `{connectionConfig.organizationName}` in the URL represents the `organizationName`. You can get this value from your connection configuration after creating the connection.
        </Note>
      </Step>
    </Steps>

    ✅ You're connected! Check the [Logs](https://app.nango.dev/dev/logs) tab in Nango to inspect requests.

    <Tip>
      Next step: [Embed the auth flow](/docs/guides/primitives/auth) in your app to let your users connect their Tailscale accounts.
    </Tip>
  </Tab>

  <Tab title="🔗 Useful links">
    | Topic | Links |
    | - | - |
    | Authorization | [Guide to connect to Tailscale (OAuth) using Connect UI](/docs/integrations/all/tailscale/connect) |
    | General | [Tailscale Website](https://tailscale.com/) |
    | | [Tailscale Admin Console](https://login.tailscale.com/admin) |
    | Developer | [Generate an OAuth client](https://login.tailscale.com/admin/settings/oauth) |
    | | [OAuth clients documentation](https://tailscale.com/kb/1215/oauth-clients) |
    | | [List of OAuth Scopes](https://tailscale.com/kb/1215/oauth-clients#scopes) |
    | | [How to generate an OAuth client access token](https://tailscale.com/kb/1215/oauth-clients#verifying-you-can-generate-api-access-tokens) |
    | | [Tailscale API docs](https://tailscale.com/api#description/overview) |

    <Note>Contribute useful links by [editing this page](https://github.com/nangohq/nango/tree/master/docs/integrations/all/tailscale.mdx)</Note>
  </Tab>

  <Tab title="🚨 API gotchas">
    *None yet, add yours!*

    <Note>Contribute API gotchas by [editing this page](https://github.com/nangohq/nango/tree/master/docs/integrations/all/tailscale.mdx)</Note>
  </Tab>
</Tabs>

<Info>
  Questions? Join us in the [Slack community](https://nango.dev/slack).
</Info>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.