---
title: "GET OAuth callback - exchanges code for tokens"
description: "OAuth callback - exchanges code for tokens"
last_updated: "2026-05-06T07:33:48.387142+00:00"
canonical_url: "https://www.doc0.dev/docs/49c89830-117b-4def-8edc-b5bcc50766e0/api/integrations/oauthcontroller-oauthcallback"
---

<APIEndpoint
  method={"GET"}
  path={"/v1/integrations/oauth/callback"}
  summary={"OAuth callback - exchanges code for tokens"}
  description={"OAuth callback - exchanges code for tokens"}
  deprecated={false}
  baseUrl={""}
/>

## Parameters

<APIParameters parameters={[{"name":"code","in":"query","required":true,"description":"The authorization code.","schema":{"type":"string"}},{"name":"state","in":"query","required":true,"description":"The OAuth state.","schema":{"type":"string"}},{"name":"error","in":"query","required":false,"description":"Error code from OAuth provider.","schema":{"type":"string"}},{"name":"error_description","in":"query","required":false,"description":"Error description from OAuth provider.","schema":{"type":"string"}}]} />

## Responses

<APIResponse
  statusCode={"302"}
  description={"Redirects to the success or error URL."}
/>

## Try It

<APIPlayground
  method={"GET"}
  path={"/v1/integrations/oauth/callback"}
  parameters={[{"name":"code","in":"query","required":true,"description":"The authorization code.","schema":{"type":"string"}},{"name":"state","in":"query","required":true,"description":"The OAuth state.","schema":{"type":"string"}},{"name":"error","in":"query","required":false,"description":"Error code from OAuth provider.","schema":{"type":"string"}},{"name":"error_description","in":"query","required":false,"description":"Error description from OAuth provider.","schema":{"type":"string"}}]}
  baseUrl={""}
/>


## Sitemap

See the full [sitemap](https://www.doc0.dev/docs/49c89830-117b-4def-8edc-b5bcc50766e0/llms.txt) for all pages in this wiki.
