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

# Revivn

> Connect Revivn to Serval with OAuth client credentials so workflows can list assets, mail-back retrievals, and pickups through the Revivn API.

## About Revivn

Revivn is an IT asset disposition platform for recovering, tracking, and repurposing hardware. Serval connects with OAuth 2.0 client credentials (Client ID and Client Secret). Serval exchanges them for short-lived access tokens at `https://api.revivn.dev/oauth/token` and refreshes tokens automatically. All API traffic goes to `api.revivn.dev`.

**Authentication:** OAuth 2.0 client credentials. Revivn does not use a static API key for the REST API.

**Data sync:** On-demand only. Serval calls Revivn when a workflow runs.

<Note>
  This integration is in beta.
</Note>

## What the Revivn integration enables

| Capability         | Description                                                                                             |
| ------------------ | ------------------------------------------------------------------------------------------------------- |
| Assets             | List and inspect received assets, including serial numbers and certificate-of-destruction links.        |
| Asset retrievals   | List and create mail-back laptop retrievals (the flow Datadog uses to track employee return shipments). |
| Pickups            | List and create pickup requests.                                                                        |
| Workflow authoring | Serval AI can discover Revivn v1 endpoints when building workflows.                                     |

Anything in the [Revivn API documentation](https://api-docs.revivn.com/) can be reached through Serval.

## Get your credentials

Create an OAuth application in the Revivn app and copy the Client ID and Client Secret.

<Steps>
  <Step title="Open API credentials in Revivn">
    Log in to the [Revivn app](https://revivn.app), then go to **API** → **API Credentials**.
  </Step>

  <Step title="Create an application">
    Click **Create Application**, enter a name (for example "Serval"), and save.
  </Step>

  <Step title="Copy Client ID and Client Secret">
    Copy both values immediately. You may not be able to view the secret again after you leave the page.
  </Step>
</Steps>

<Warning>
  Store the Client Secret securely when it is shown. If you lose it, create a new application in Revivn and update Serval.
</Warning>

## Connect in Serval

<Steps>
  <Step title="Open the Revivn connect form">
    Add a new Revivn connection from Serval's integrations page.
  </Step>

  <Step title="Enter instance name">
    **Instance Name** is a label for this connection in Serval (for example "Production Revivn").
  </Step>

  <Step title="Enter OAuth credentials">
    Paste the **Client ID** and **Client Secret** from Revivn. Do not use API key mode for a custom application — Revivn expects OAuth bearer tokens.
  </Step>

  <Step title="Connect">
    Submit the form. Serval runs health checks automatically after a successful connect.
  </Step>
</Steps>

## Verifying the connection

Serval ships four health checks:

* **Test Connection** — lists one page of assets. Success: "Successfully connected to the Revivn API." Failure: "Unable to connect to Revivn. Verify your Client ID and Client Secret from Revivn App → API → API Credentials."
* **List Assets** — confirms read access to `/api/v1/assets`.
* **List Pickups** — confirms read access to `/api/v1/pickups`.
* **List Asset Retrievals** — confirms read access to `/api/v1/asset_retrievals`.

## Gotchas and troubleshooting

<AccordionGroup>
  <Accordion title="401 invalid_token or access token expired">
    Re-enter valid Client ID and Client Secret on the Revivn connection in Serval. If the connection was set up as a custom application with an API key instead of OAuth, switch to the catalog **Revivn** integration and connect with OAuth credentials.
  </Accordion>

  <Accordion title="Custom application vs catalog Revivn">
    Datadog and other early adopters sometimes used a **custom application** with the wrong auth type (`X-Api-Key`). The catalog Revivn integration uses OAuth client credentials and automatic token refresh. Prefer the catalog integration for new setups.
  </Accordion>
</AccordionGroup>
