# Initial authorization endpoint

`GET https://merchant.shuttleglobal.com/authorize`

Initiates the OAuth 2.0 authorization flow on merchant.shuttleglobal.com

Flow:
1. Your application redirects the user to this endpoint with required parameters
2. This endpoint responds with a 302 redirect to Shuttle's login page
3. On the login page, the user authenticates and grants permission to your application
4. After successful authentication and consent, the user is redirected to your redirect_url with an authorization code
5. Use this code immediately with the /token endpoint to obtain tokens
   IMPORTANT: The authorization code expires after 15 minutes

Notes:
- The authorization code is valid for only 15 minutes from the time it's generated
- The state parameter is recommended for CSRF protection
- Your redirect_url must match one of your pre-registered URLs

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `response_type` | query | string | yes |  |
| `client_id` | query | string | yes |  |
| `redirect_url` | query | string (uri) | yes |  |
| `scope` | query | string | no |  |
| `state` | query | string | no |  |

## Responses

### 302: Redirect to Shuttle's login page or return an error

## Example request

```sh
curl --request GET \
  --url https://merchant.shuttleglobal.com/authorize
```

Reference page: https://docs.shuttleglobal.com/platforms/reference/oauth/operations/authorize/