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

# Server SDKs

> Use Authsignal's server-side SDKs for Node.js, C#, Java, Ruby, Python, PHP, and Go.

Server SDKs make it easier to interact with our [REST API](/api-reference/server-api/overview) from your server-side code.

## Installation

<Tabs>
  <Tab title="Node.js">
    <CodeGroup>
      ```bash npm theme={null}
      npm install @authsignal/node
      ```

      ```bash yarn theme={null}
      yarn add @authsignal/node
      ```

      ```bash pnpm theme={null}
      pnpm add @authsignal/node
      ```

      ```bash bun theme={null}
      bun add @authsignal/node
      ```
    </CodeGroup>
  </Tab>

  <Tab title="C#">
    ```bash theme={null}
    dotnet add package Authsignal.Server.Client
    ```
  </Tab>

  <Tab title="Java">
    **Gradle**

    Add this dependency to your project's build file:

    ```groovy theme={null}
    implementation 'com.authsignal:authsignal-java:2.3.0'
    ```

    **Maven**

    Add this dependency to your project's POM:

    ```xml theme={null}
    <dependency>
    <groupId>com.authsignal</groupId>
    <artifactId>authsignal-java</artifactId>
    <version>2.3.0</version>
    </dependency>
    ```
  </Tab>

  <Tab title="Ruby">
    ```bash theme={null}
    gem 'authsignal-ruby'
    ```
  </Tab>

  <Tab title="Python">
    ```bash theme={null}
    pip3 install authsignal
    ```
  </Tab>

  <Tab title="PHP">
    ```bash theme={null}
    composer require authsignal/authsignal-php
    ```
  </Tab>

  <Tab title="Go">
    ```bash theme={null}
    go get github.com/authsignal/authsignalgo/v2
    ```
  </Tab>
</Tabs>

## Initialization

Initialize the Authsignal client by providing your tenant's Server API secret key and the API URL for your region.

<CodeGroup>
  ```ts Node.js theme={null}
  import { Authsignal } from "@authsignal/node";

  const authsignal = new Authsignal({
    apiSecretKey: "YOUR_SECRET_KEY",
    apiUrl: "YOUR_API_URL",
  });
  ```

  ```csharp C# theme={null}
  using Authsignal;

  var authsignal = new AuthsignalClient(
      apiSecretKey: "YOUR_SECRET_KEY",
      apiUrl: "YOUR_API_URL"
  );
  ```

  ```java Java theme={null}
  import com.authsignal.AuthsignalClient;

  AuthsignalClient authsignal = new AuthsignalClient(
      "YOUR_SECRET_KEY",
      "YOUR_API_URL"
  );
  ```

  ```ruby Ruby theme={null}
  require 'authsignal'

  Authsignal.setup do |config|
      config.api_secret_key = ENV["YOUR_SECRET_KEY"]
      config.api_url = "YOUR_API_URL"
  end
  ```

  ```python Python theme={null}
  from authsignal.client import AuthsignalClient

  authsignal = AuthsignalClient(
      api_secret_key="YOUR_SECRET_KEY",
      api_url="YOUR_API_URL"
  )
  ```

  ```php PHP theme={null}
  Authsignal::setApiSecretKey("YOUR_SECRET_KEY");
  Authsignal::setApiUrl("YOUR_API_URL");
  ```

  ```go Go theme={null}
  import "github.com/authsignal/authsignalgo/v2/client"

  client := NewAuthsignalClient(
      "YOUR_SECRET_KEY",
      "YOUR_API_URL",
  )
  ```
</CodeGroup>

## Regions

The API URLs for each region are defined below.

| Region        | API URL                            |
| ------------- | ---------------------------------- |
| US (Oregon)   | `https://api.authsignal.com/v1`    |
| AU (Sydney)   | `https://au.api.authsignal.com/v1` |
| EU (Ireland)  | `https://eu.api.authsignal.com/v1` |
| CA (Montreal) | `https://ca.api.authsignal.com/v1` |

## Usage

<CardGroup>
  <Card title="Actions" href="/sdks/server/actions" horizontal />

  <Card title="Users" href="/sdks/server/users" horizontal />

  <Card title="Authenticators" href="/sdks/server/authenticators" horizontal />

  <Card title="Challenges" href="/sdks/server/challenges" horizontal />

  <Card title="Sessions" href="/sdks/server/sessions" horizontal />

  <Card title="Webhooks" href="/sdks/server/webhooks" horizontal />

  <Card title="Error handling" href="/sdks/server/error-handling" horizontal />
</CardGroup>

## Repositories

<CardGroup>
  <Card title="Node.js" icon="node-js" href="https://github.com/authsignal/authsignal-node" horizontal />

  <Card title="C#" icon="github" href="https://github.com/authsignal/authsignal-dotnet" horizontal />

  <Card title="Java" icon="java" href="https://github.com/authsignal/authsignal-java" horizontal />

  <Card title="Ruby" icon="gem" href="https://github.com/authsignal/authsignal-ruby" horizontal />

  <Card title="Python" icon="python" href="https://github.com/authsignal/authsignal-python" horizontal />

  <Card title="PHP" icon="php" href="https://github.com/authsignal/authsignal-php" horizontal />

  <Card title="Go" icon="github" href="https://github.com/authsignal/authsignal-go" horizontal />
</CardGroup>
