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
- Call this endpoint once with your API customer credentials.
- Persist the returned token securely on your side.
- Send the token in the
Authorizationheader of every other request:Authorization: Bearer {token}. - 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
{
"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
Authorizationheader. - 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-codeheader defaults toTRwhen omitted.
Request
Responses
- 200
- 400
Token generated successfully.
Invalid credentials or invalid request payload.