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

# Redirection Based OAuth

Redirection based OAuth journeys offer secure access to third-party apps such as Quicko, just like Google OAuth app can be used to get access to users google profile, contacts, calendar, emails etc. Following steps explain a standard OAuth journey:

<Steps>
  <Step title="User navigates to your OAuth Login Page">
    User navigates to your OAuth Login Page
  </Step>

  <Step title="Upon successful login control is passed back with a request_token">
    Upon successful login control is passed back with a `request_token` to the registered redirect URL
  </Step>

  <Step title="Quicko exchanges short lived request_token with a long lived access_token">
    Quicko exchanges short lived `request_token` with a long lived `access_token`
  </Step>

  <Step title="Quicko can now import data using APIs">
    Quicko can now import data using APIs provided by you using `access_token`
  </Step>
</Steps>

<Info>
  **Note**

  An optional redirect param should be supported by your OAuth login endpoint, which will be used to navigate the user after a successful login attempt. Redirect URL request parameter must be Base64 encoded, eg: `https://join.quicko.com` will be used like:

  ```
  {{your_oauth_app_url}}/login?api_key={api_key}&redirect=aHR0cHM6Ly9qb2luLnF1aWNrby5jb20=
  ```
</Info>

## Authorize Endpoint

The authorize endpoint is used to exchange a request token for a resource owner's access token.

<Accordion title="Authorize Request">
  <ParamField query="request_token" type="string" required>
    The short-lived request token obtained from the OAuth login page
  </ParamField>
</Accordion>

<OpenAPI url="/projects/integration/api-reference/oauth_openapi.json" method="GET" path="/oauth/authorize" />

## API Reference

| HTTP Method | Resource                                           | Description            |
| ----------- | -------------------------------------------------- | ---------------------- |
| GET         | `/oauth/authorize?request_token={{request_token}}` | Requires Request Token |
