# Get Authorization URL

Get Keeta merchant authorization link for merchant authorization process.

> NOTE: Merchants can click this link to complete the authorization process.

The returned URL can be used to redirect merchants to Keeta's authorization page.

URL Example: "https://merchant.mykeeta.com/m/web/openapi/authorize?locale=en&region=BR&cityId=110200008&risk_cost_id=&responseType=client_credentials&appId=2123830428&redirectUri=&state=&scope=all/#/app-activation"

Authorization Flow:
If Software Services wants merchants to be redirected to your own page after authorization, you can set the redirectUri parameter accordingly. 

When the merchant completes authorization, they will be redirected to your specified redirectUri with the following parameters appended:


redirectUri?authId=authId&state=%s&appId=%s&timestamp=%s&keetaMerchantId=%s&code=%s


Parameter definitions:
- authId: Unique authorization identifier for this specific authorization session. Use this ID for subsequent API calls.
- state: State parameter for request/response correlation (matches your original request)
- appId: Your application identifier
- timestamp: Authorization completion timestamp
- keetaMerchantId: The merchant ID generated by Keeta, only returned when the application is in shop_level_authorization_code mode
- code: The authorization code generated by Keeta, only returned when the application is in shop_level_authorization_code mode
 

For detailed workflow, please refer to: Merchant Self-serve Authorization

HOST: Keeta

DIRECTION:

Endpoint: GET /oauth/authorization/url
Version: v.1.0.7

## Query parameters:

  - `clientId` (string, required)
    Client ID

  - `redirectUri` (string)
    redirectUri

## Response 200 fields (application/json):

  - `merchantAuthorizationUrl` (string, required)
    Authorization URL for merchant
    Example: "https://merchant.mykeeta.com/m/web/openapi/authorize?locale=en&region=BR&cityId=110200008&risk_cost_id=&responseType=client_credentials&appId=2123830428&redirectUri=&state=&scope=all/#/app-activation"

## Response 401 fields (application/problem+json):

  - `title` (string, required)
    Short description of the problem.
    Example: "Unexpected error"

  - `status` (integer, required)
    HTTP code of the returned status.
    Example: 500


