> ## Documentation Index
> Fetch the complete documentation index at: https://docs.taxrock.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Authorize

> GET /authorize

Open this URL in the user's browser to start the connect flow. The user logs in to TaxRock
and consents. TaxRock redirects to your registered callback with `?code=...&state=...`.
This is an interactive browser redirect, not a JSON endpoint. Verify the `state` value does not change, and
exchange the returned `code` at [Get or refresh a token](https://docs.taxrock.com/delegate-access/api-reference/authentication/token.md).

Pick your environment, paste your `client_id` and `code_challenge`, then copy the URL:

environment

client\_id

code\_challenge
(from step 1)

Include `verify:tins` (needed for
[TIN verification](https://docs.taxrock.com/delegate-access/api-reference/tin-match/verify.md))

## Query parameters

**response\_type** `string` *required*

Must be `code`.

**client\_id** `string` *required*

Your client ID for the environment.

**redirect\_uri** `string` *required*

Your callback URL, registered with TaxRock.

**scope** `string` *required*

Space-delimited. Use `offline_access read:client-accounts`, adding `verify:tins` if you
use [TIN verification](https://docs.taxrock.com/delegate-access/api-reference/tin-match/verify.md). The `offline_access` scope is
what yields a refresh token. See [Scopes](https://docs.taxrock.com/delegate-access/authentication.md#scopes).

**audience** `string` *required*

`https://delegate.api.taxrock.com` (the same in both environments).

**code\_challenge** `string` *required*

The PKCE S256 challenge derived from your `code_verifier`.

**code\_challenge\_method** `string` *required*

Must be `S256`.

**state** `string`

An opaque value echoed back to your callback. Verify it matches what you sent.

See the [Authentication Details](https://docs.taxrock.com/delegate-access/authentication.md) reference for more information.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.