# How to Connect to Remote

This guide walks you through generating an API token from Remote to connect your account.

- [Prerequisites](#prerequisites)
- [Generate Your API Token](#generate-your-api-token)
- [Vault Connection Setup](#vault-connection-setup)

## Prerequisites

- **Admin access** - Only company admins or company owners can create and revoke API tokens
- **Active Remote account** - You must have an active Remote company account

## Generate Your API Token

Follow these steps to generate an API token in Remote:

1. Log in to your Remote account.

2. Navigate to **Company → Company Settings → Integrations & APIs → Integrations**.

3. Click on the **Remote API** card.

4. Click the **Generate API token** button.

5. When prompted, enter a name for your API token (e.g., "Apideck Integration").

6. Accept the **Remote API Terms of Use** agreement.

7. Your new token will appear in the table. Copy the token value - you'll need this for the Vault setup.

## Environment

Remote API tokens are environment-specific:

- **Production tokens** start with `ra_live_` and work with the production API (`https://gateway.remote.com/`)
- **Sandbox tokens** start with `ra_test_` and work only in the sandbox environment (`https://gateway.remote-sandbox.com/`)

Make sure to select the matching environment in the Vault connection settings below.

## Vault Connection Setup

Enter your API token in Vault and select the appropriate environment:

- **API Token** - The token you generated in Remote (starts with `ra_live_` or `ra_test_`)
- **Environment** - Select `Production` for live data or `Sandbox` for testing

Click **Save** to complete the connection.

You're connected now!

## Known Limitations

- **Time-off requests are created as approved** — Remote's API currently only supports creating time-off requests with `status: approved`. Requests cannot be created in `requested` state via the API.

## Revoking Tokens

To revoke a token:

1. Navigate to **Company → Company Settings → Integrations & APIs → Integrations**
2. Click on the **Remote API** card
3. Locate the token you want to revoke in the table
4. Click the three-dot menu next to the token
5. Select the revoke option
6. Confirm the deletion

Revoked tokens cannot be recovered - you'll need to generate a new token if needed.
