---
title: "Callback"
method: GET
path: "/api/auth/stamps/callback"
tags: ["postage"]
---

# Callback

`GET /api/auth/stamps/callback`

## Request

- Base URL: `https://api.pigeonly.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.pigeonly.com/api/auth/stamps/callback`
- Auth: none declared

Where Stamps.com sends the administrator back.

IT REDIRECTS TO THE WEB APP, NOT TO ITSELF. The API and the web app are
different hosts on Railway (api-staging-*.up.railway.app vs
web-staging-*.up.railway.app), so a relative "/system" resolves against
the API and answers {"detail":"Not Found"} -- which is exactly what the
first successful connection did. The OAuth flow had worked perfectly and
the only thing wrong was the door it opened. `frontend_url` is the same
setting the Google login callback already redirects through, for the same
reason.

UNAUTHENTICATED BY NECESSITY: the browser arrives here from Stamps.com,
not from Roost, so there is no session to require. The single-use `state`
nonce is what makes that safe -- it was minted for one admin-initiated
flow, it is consumed in the same statement that checks it, and a missing,
expired, replayed or unknown one is refused.

NOTHING FROM THE QUERY STRING IS LOGGED. `code` is a credential until it
is exchanged, and OAuth error descriptions have been known to echo it.

## Query parameters

- `code` string, nullable
- `state` string, nullable
- `error` string, nullable
- `error_description` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os.md) - [All operations](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os/llms.txt) - [OpenAPI document](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os/revisions/14571c4b7007?raw)
