> ## 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.

# API Based OAuth

API-based OAuth workflow that allows access without any redirection.

## API Based Workflow

The API-based workflow is a two-step process:

**1. Generate OTP**

Generate OTP for users using the Generate OTP endpoint. Users will obtain a One Time Password (OTP) on their registered email address with a validity of 10 minutes.

| HTTP Method | Resource | Description |
| - | - | - |
| GET | `{{your_oauth_app_authenticate}}/otp?username={username}` | API accepts username and sends OTP to registered email. |

**2. Verify OTP**

Provide the OTP and username (user's email) to verify the OTP. Obtain the `access_token` and use that with all subsequent requests.

| HTTP Method | Resource | Description |
| - | - | - |
| POST | `{{your_oauth_app_authenticate}}/otp` | API verifies the OTP and returns the access token. |

### Step 2

After obtaining the `access_token`, use it for all subsequent requests to access protected resources.

### Additional Information

* The OTP is valid for 10 minutes.
* Ensure to handle errors appropriately, such as invalid OTP or expired OTP.

***


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