Skip to main content

3. Authorization (Authentication)

3.1 AccessToken Retrieval

Endpoint: POST /auth/api/token/connect

Base URL: https://pgw.netahsilatdemo.com

Request

{
"apiKey": "YOUR_API_KEY",
"secretKey": "YOUR_SECRET_KEY"
}

Response

{
"expiry": "2025-09-18T09:07:17Z",
"token": "ACCESS_TOKEN",
"type": "Bearer"
}

Request Body

AreaTypeMandatoryDescription
apiKeystringMerchant-specific public key
secretKeystringMerchant-specific secret key

Response Body

AreaTypeDescription
tokenstringJWT token to be used in API calls
expirydatetimeToken validity period
typestringToken tipi (Bearer)

Use

On all API calls

Authorization: Bearer {ACCESS\_TOKEN}

Important Notes

  • If token expires → 401 Unauthorized
  • Token expiry check should be done on the system side
  • Automatic refresh is recommended in case of expiration