---
title: "Mint a long-lived device token"
method: POST
path: "/api/device-token"
tags: ["Account"]
---

# Mint a long-lived device token

`POST /api/device-token`

## Request

- Base URL: `https://trvlrr.app`
- URL: `https://trvlrr.app/api/device-token`
- Auth: HTTP bearer

For background uploads and the share extension, where a Clerk session token (which lives about a minute) is impractical. A token unused for 90 days is dropped.

## Query parameters

- `name` string: A label for the device.

## Response `200`

The new token; store it securely.

- DeviceToken
  - `token` string, required: A long-lived bearer credential, dtk_…

## Other responses

- `401`: No usable credential: a Clerk session token, a device token or an OAuth access token is required.
- `403`: The caller may not do this to this account or trip.

---

[API](https://skmtc.dev/trvlrr/apis/trvlrr-api.md) · [All operations](https://skmtc.dev/trvlrr/apis/trvlrr-api/llms.txt) · [OpenAPI document](https://skmtc.dev/trvlrr/apis/trvlrr-api/revisions/ea024946b293?raw)
