---
title: "Poll Source Oauth Grant"
method: GET
path: "/sources/connectors/{code}/oauth/grant"
tags: ["Sources"]
---

# Poll Source Oauth Grant

`GET /sources/connectors/{code}/oauth/grant`

## Request

- Base URL: `https://api.streamkap.com`
- URL: `https://api.streamkap.com/sources/connectors/{code}/oauth/grant`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/streamkap/apis/streamkap-rest-api/docs/sources/connectors/:code/oauth/grant/get.ts> (a function with typed inputs; its response is checked against the schema)

Collect the outcome of an OAuth connect flow the caller started, by its ``state``.

This is the reliable delivery path for the ``oauth_grant_id``: the callback's ``postMessage`` is
best-effort, and providers whose consent page sets ``Cross-Origin-Opener-Policy`` sever the popup's
``window.opener`` so it never lands — so poll this instead. Scoped to the tenant and user that started
the flow, and single-use. Returns ``{"oauth_grant_id": ...}`` once ready,
``{"error": ...}`` for a recorded failure, or ``{"status": "pending"}`` while the callback is still in
flight (keep polling). Inert (always pending) for a state that isn't the caller's live flow.

## Path parameters

- `code` string, required

## Query parameters

- `state` string, required

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-01** `50e54c2e65f2`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/streamkap/apis/streamkap-rest-api/changes/sources/connectors/:code/oauth/grant/get.md)

---

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