clientId): The unique identifier for your application.clientSecret): Used to authenticate your app when exchanging the authorization code for a token.https://app.hypersku.com/application/auth| Parameter | Required | Description |
|---|---|---|
clientId | Yes | Your application's API Key provided during registration. |
scope | Yes | The list of permissions requested (oms). |
redirectUri | Yes | The callback address must exactly match the one provided to the platform during registration. |
state | Yes | A randomly generated string to prevent CSRF attacks. Must be validated in Step 3. |
redirect_uri with a temporary code. Your backend must exchange this code for a permanent token.POSThttps://api.hypersku.com/api/auth/admin/token/access_tokencurl --location '/api/auth/admin/token/access_token' \
--header 'Content-Type: application/json' \
--data '### Step 1: Application Registration
Before starting the authorization flow, you must register your application with the platform.
- **Submission Requirements**:
- Provide a **110 x 110 px image** (Application Logo).
- Provide the **Callback URL (Redirect URI)**.
- **Credentials Issued**: Upon registration, the platform will generate the following for your app:
- **Client ID** (`clientId`): The unique identifier for your application.
- **Client Secret** (`clientSecret`): Used to authenticate your app when exchanging the authorization code for a token.
---
### Step 2: Redirect to Authorization URL
Initiate the OAuth flow by redirecting the user'\''s browser to the platform'\''s authorization endpoint.
- **Authorization URL**: `https://app.hypersku.com/application/auth`
**Request Parameters**
| Parameter | Required | Description |
| :--- | :---: | :--- |
| `clientId` | Yes | Your application'\''s API Key provided during registration. |
| `scope` | Yes | The list of permissions requested (oms). Follow the principle of least privilege. |
| `redirectUri` | Yes | The callback address must exactly match the one provided to the platform during registration. |
| `state` | Yes | A randomly generated string to prevent CSRF attacks. Must be validated in Step 3. |
**Example URL:**
```http
https://app.hypersku.com/application/auth?clientId=YOUR_CLIENT_ID&scope=oms&redirectUri=https://yourdomain.com/callback&state=GENERATED_RANDOM_STRING
```
### Step 3: Request an Access Token
After the user grants permission, the platform will redirect to your `redirect_uri` with a temporary `code`. Your backend must exchange this code for a permanent token.
- **Request Method**: `POST`
- **Token Endpoint**: `https://api.hypersku.com/api/auth/admin/token/access_token`'{
"accessToken": "string",
"expiresIn": 0,
"refreshToken": "string",
"refreshTokenExpireIn": 0,
"scope": "string",
"userId": "string"
}