# Continue a directory source connect link to the provider

<div class="api-op" data-api-operation>
<div class="api-op__main">

<p class="api-endpoint"><span class="method method-post">POST</span> <code>/v1/directory_sources/oauth/confirm</code></p>

The confirm page's form. It needs the page's cookie, the matching `csrf` field and an Origin of the API host, else `directory_source_oauth_confirm_required` (403) and nothing changes. It marks the flow confirmed, binds it to this browser with a cookie and redirects to the provider's consent screen. The callback refuses a flow that was never confirmed, or one arriving without that browser's cookie, with `directory_source_oauth_confirm_required`.

<dl class="api-facts"><div><dt>Scope</dt><dd><code>public</code></dd></div><div><dt>Auth</dt><dd>None</dd></div><div><dt>Since</dt><dd>1.1</dd></div></dl>

## Headers

<ul class="api-fields">
<li class="api-field">
<p class="api-field__head"><code class="api-field__name">OhAuthCat-Version</code> <span class="api-field__type">string</span></p>
Minor version; defaults to the environment's pin.
</li>
</ul>

## Request body

Content type `application/x-www-form-urlencoded`.

## Responses

<ul class="api-responses">
<li class="api-response"><span class="api-status api-status--neutral">303</span> <span>Redirect to the provider's consent screen. Sets the browser binding cookie (HttpOnly, Secure, SameSite=Lax, Path=/v1/directory_sources/oauth/) that the callback requires.</span></li>
<li class="api-response"><span class="api-status api-status--bad">400</span> <span>`<a href="/errors/directory_source_oauth_state_invalid/">directory_source_oauth_state_invalid</a>`. <span class="api-field__type">Error</span></span></li>
<li class="api-response"><span class="api-status api-status--bad">403</span> <span>Codes: <a href="/errors/api_key_scope_missing/">api_key_scope_missing</a>, <a href="/errors/ip_not_allowed/">ip_not_allowed</a>, <a href="/errors/plan_limit_reached/">plan_limit_reached</a>. <span class="api-field__type">Error</span></span></li>
<li class="api-response"><span class="api-status api-status--bad">429</span> <span>Code: <a href="/errors/rate_limited/">rate_limited</a>. Retry-After is set. <span class="api-field__type">Error</span></span></li>
<li class="api-response"><span class="api-status api-status--bad">503</span> <span>Code: <a href="/errors/service_unavailable/">service_unavailable</a>. Retry-After is set; writes are paused. <span class="api-field__type">Error</span></span></li>
<li class="api-response"><span class="api-status api-status--neutral">default</span> <span>Any other error, including <a href="/errors/internal_error/">internal_error</a>. Every code is in the error catalogue. <span class="api-field__type">Error</span></span></li>
</ul>

Errors share one shape; see the [error code catalogue](/errors/).

</div>
<div class="api-op__code">

**curl**

```sh wrap
curl -X POST \
  "https://api.ohauthcat.com/v1/directory_sources/oauth/confirm"
```

**Node**

```javascript wrap
const response = await fetch(
  "https://api.ohauthcat.com/v1/directory_sources/oauth/confirm",
  {
    method: "POST",
  },
);
const data = await response.json();
```

**Python**

```python wrap
import os
import requests

response = requests.post(
    "https://api.ohauthcat.com/v1/directory_sources/oauth/confirm",
)
data = response.json()
```

</div>
</div>
