---
title: "POST /oauth/tokens/:connect"
method: POST
path: "/oauth/tokens/:connect"
tags: ["OAuthTokens"]
---

# POST /oauth/tokens/:connect

`POST /oauth/tokens/:connect`

## Request

- Base URL: `{endpoint}`
- URL: `{endpoint}/oauth/tokens/:connect`
- Auth: API key in header `Authorization`

Returns Connection link needed in the OAuth flow.

## Query parameters

- `api-version` string, required

## Request body

- OAuthConnectRequest: Get OAuth config query parameters.
  - `partyId` string, required: Id of the party.
  - `oAuthProviderId` string, required: Id of the OAuthProvider.
  - `userRedirectLink` string, required: Link to redirect the user to, at the end of the oauth flow.
  - `userRedirectState` string: State to provide back when redirecting the user, at the end of the oauth flow.

## Response `200`

Success

- string

## Other responses

- `default`: Error

---

[API](https://skmtc.dev/azure/apis/agrifood-agfoodplatform.md) - [All operations](https://skmtc.dev/azure/apis/agrifood-agfoodplatform/llms.txt) - [OpenAPI document](https://skmtc.dev/azure/apis/agrifood-agfoodplatform/revisions/33cf1de6e0c4?raw)
