---
title: "Oauth Callback"
method: GET
path: "/api/oauth/{provider_slug}/callback"
tags: ["oauth"]
---

# Oauth Callback

`GET /api/oauth/{provider_slug}/callback`

## Request

- Base URL: `https://api.maritime.sh` (the document declares no server; this is the origin it was published from)
- URL: `https://api.maritime.sh/api/oauth/{provider_slug}/callback`
- Auth: none declared

Public callback. Provider redirects the user here after they
approve or deny on the provider's site.

On success: exchange code for tokens, persist as AES-encrypted env
vars on the bound agent, optionally DM the user a success
message, render a friendly HTML page.

On any failure: render an error page so the user knows what
happened. No tokens are persisted on partial failures.

## Path parameters

- `provider_slug` string, required

## Query parameters

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

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

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