---
title: "Callback for provider OAuth setup."
method: GET
path: "/integrations/calendar/callback/{provider}"
tags: ["calendar"]
---

# Callback for provider OAuth setup.

`GET /integrations/calendar/callback/{provider}`

## Request

- Base URL: `https://localhost:8080/api/v9`
- URL: `https://localhost:8080/api/v9/integrations/calendar/callback/{provider}`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/toggl/apis/toggl-api/docs/integrations/calendar/callback/:provider/get.ts> (a function with typed inputs; its response is checked against the schema)

Callback endpoint used only by the Calendar Service Provider, which fetches the code

## Query parameters

- `provider` string, required
- `state` string, required
- `code` string, required

## Other responses

- `302`: URL passed in the return_to parameter in the setup with a 'result' query with value 'success', 'declined' or 'error'
- `500`: Internal Server Error

---

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