# User Based Apps



1. Invoke `/api-gw/oauth/authorize` in a browser or web application.
2. Pass `client_id`, `redirect_uri`, `response_type`, `scope` and `state`.
3. User will be redirected to the **Tradejini CubePlus SSO Login** page.
4. After successful login, the user is redirected to the configured `redirect_uri` with a `code`.
5. Invoke `POST /api-gw/oauth/token` using `code`, `client_id`, `redirect_uri`, `client_secret` and `grant_type`.
6. On successful authorization, the API returns an `access_token`.
7. Form the authorization token as: `Bearer <API_KEY>:<access_token>` .
8. Use this token for all API request.

<ThemedImage imageName="&#x22;user-based-apps&#x22;" imageAlt="&#x22;User Based Apps&#x22;" className="apps-images-container" fetchPriority="high" loading="eager" />
