---
title: "OAuth authorization-code callback"
method: GET
path: "/api/oauth/{serverId}/callback"
tags: ["OAuth"]
---

# OAuth authorization-code callback

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

## Request

- Base URL: `/api/plugins/consensys-asko11y-app/resources` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/plugins/consensys-asko11y-app/resources/api/oauth/{serverId}/callback`
- Auth: one of:
  - API key in cookie `grafana_session`
  - HTTP bearer

Redirect target registered with the authorization server. Validates the one-shot state, exchanges the code for tokens, persists them for the initiating user, and returns a small HTML page that notifies the opener window via postMessage and closes itself.

## Path parameters

- `serverId` string, required

## Query parameters

- `code` string
- `state` string
- `error` string

## Response `200`

HTML page reporting the outcome to the opener window

## Changes

- **2026-08-25** `336f05fb2b50`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/consensys/apis/ask-o11y-ai-powered-observability-assistant-api/changes/api/oauth/:serverId/callback/get.md)

---

[API](https://skmtc.dev/consensys/apis/ask-o11y-ai-powered-observability-assistant-api.md) - [All operations](https://skmtc.dev/consensys/apis/ask-o11y-ai-powered-observability-assistant-api/llms.txt) - [OpenAPI document](https://skmtc.dev/consensys/apis/ask-o11y-ai-powered-observability-assistant-api/revisions/ee3ccd0f186d?raw)
