---
title: "Call OAuth provider API"
method: POST
path: "/auth/oauth/{provider}/call-api"
tags: ["OAuth Authentication"]
---

# Call OAuth provider API

`POST /auth/oauth/{provider}/call-api`

## Request

- Base URL: `https://api.volcano.dev`
- URL: `https://api.volcano.dev/auth/oauth/{provider}/call-api`
- Auth: HTTP bearer

Make an authenticated request to an OAuth provider's API on behalf of the user.
The user's stored access token is automatically used and refreshed if needed.

The request is always sent to the provider's fixed API base URL joined with
the caller-supplied `endpoint`. `endpoint` must be a relative path beginning
with `/` (optionally with a query string); it cannot change the target host.
Absolute URLs, protocol-relative `//host` values, or userinfo (`@host`) are
rejected with `400` so the request can never be redirected to another host.

Examples of `endpoint`:
- Google userinfo: `/oauth2/v1/userinfo`
- GitHub repositories: `/user/repos`
- Microsoft Graph profile: `/me`

The response wraps the provider's raw JSON value with request metadata.
An empty provider body is represented as `data: null`; the envelope
preserves the provider's HTTP status in `status_code`, including errors.
Provider response bodies are limited to 8 MiB after decompression.
Transport failures, invalid JSON (including invalid UTF-8), and oversized
bodies return `502`. Provider redirects to another origin are blocked and
return `400`.

## Path parameters

- `provider` 'google' | 'github' | 'microsoft' | 'apple', required

## Request body

- object
  - `endpoint` string, required: Relative path on the provider's API, beginning with `/`. It is joined with the provider's fixed base URL; it must not contain a scheme, host, userinfo, or a leading `//`.
  - `method` 'GET' | 'POST': HTTP method to use
  - `body` object: Request body for POST requests

## Response `200`

Provider API response

- object: OAuth provider API response envelope
  - `provider` 'google' | 'github' | 'microsoft' | 'apple', required
  - `endpoint` string, required
  - `status_code` integer, required
  - `data` unknown, required

## Other responses

- `400`: Invalid request (for example: missing `endpoint`, an `endpoint` that is not a relative path, or an unsupported HTTP method), or a provider redirect to another origin.
- `401`: Not authenticated
- `404`: OAuth provider configuration not found
- `500`: Failed to create the provider API request
- `502`: Provider transport failure, invalid JSON, or response body larger than 8 MiB

## Changes

- **2026-09-19** `3a6f365f3f35`: 5 breaking, 10 info
  - the response's body type changed from no type to `object` for status `400`
  - the response's body type changed from no type to `object` for status `401`
  - the response's body type changed from no type to `object` for status `404`
  - the response's body type changed from no type to `object` for status `500`
  - …11 more
- **2026-09-04** `2ce691368d38`: 2 info
  - added the non-success response with the status `404`
  - added the non-success response with the status `500`
- **2026-09-04** `452e5e47d0a4`: 1 breaking
  - the response property `data` became nullable for the status `200`
- **2026-09-01** `112880cc4919`: 4 info
  - added the required property `data` to the response with the `200` status
  - added the required property `endpoint` to the response with the `200` status
  - added the required property `provider` to the response with the `200` status
  - added the required property `status_code` to the response with the `200` status
- **2026-08-27** `bb44e98aba2e`: 6 breaking, 3 warning
  - the response's body type changed from `object` to no type for status `400`
  - the response's body type changed from `object` to no type for status `401`
  - the response's body type changed from `object` to no type for status `502`
  - removed the required property `error` from the response with the `400` status
  - …5 more

[Operation history](https://skmtc.dev/kong/apis/volcano-api/changes/auth/oauth/:provider/call-api/post.md)

---

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