Skip to main content

Generate Token

POST 

/Login/Generate-Token

Authenticates an API customer with email and password and returns a bearer access token that must be sent on every subsequent request.

How it works​

  1. Call this endpoint once with your API customer credentials.
  2. Persist the returned token securely on your side.
  3. Send the token in the Authorization header of every other request: Authorization: Bearer {token}.
  4. When the token expires, call this endpoint again to obtain a new one.

The optional callbackData field is echoed back unchanged in the response and is useful for correlating the login attempt with a record on your side.

Sample request​

POST /Login/Generate-Token HTTP/1.1
Host: api.hyperteknoloji.com
h-region-code: TR
Content-Type: application/json
{
"Email": "[email protected]",
"Password": "your-password",
"callbackData": {"orderDeliverCallback": "https://yourapp.com/order/callback", "productUpdateCallback": "https://yourapp.com/products/update"}
}

Sample response​

{
"data": {
"Token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"Expiration": "2026-05-14T10:30:00Z",
"callbackData": {"orderDeliverCallback": "https://yourapp.com/order/callback", "productUpdateCallback": "https://yourapp.com/products/update"}
},
"success": true,
"message": "OK"
}

Notes​

  • This endpoint is anonymous; do not send an existing Authorization header.
  • The credentials must belong to a customer flagged as an API customer (IsAPI = 1).
  • The request must come from an IP address allowed in the API settings; requests from any other address are rejected with error code -26. If no IP address is defined, no token can be issued, so add your server IPs in the API settings first.
  • After 10 failed attempts for the same email within 15 minutes, further requests are rejected until the 15-minute window ends.
  • The h-region-code header defaults to TR when omitted.

Request​

Responses​

Token generated successfully.