{"templateId":"markdown","versions":[{"version":"opendelivery","label":"Open Delivery API","link":"/apis/opendelivery/docs/auth","default":true,"active":false,"folderId":"58c9a61d"},{"version":"standard","label":"Standard Keeta API","link":"/apis/standard/docs/auth","default":false,"active":false,"folderId":"58c9a61d"},{"version":"grocery","label":"Grocery Keeta API","link":"/apis/grocery/docs/auth","default":false,"active":true,"folderId":"58c9a61d"}],"sharedDataIds":{"sidebar":"sidebar-apis/@grocery/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Authorization Guide"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"authorization-guide","__idx":0},"children":["Authorization Guide"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"1-general-specifications","__idx":1},"children":["1. General Specifications"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["All API interactions must utilize HTTPS with strict adherence to the following technical standards:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Content Handling"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Content-Type"]},": application/json (mandatory for all requests)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Character Encoding"]},": UTF-8 exclusively"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Common Request Parameters (HTTP Header)"]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Every API request must include these four essential parameters within the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["HTTP Header"]},":"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Header"},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Header"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Description"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"nobr","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorization"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Authorization token which have a 6-hour validity period and must be refreshed via the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST {{URL}}/api/open/grocery/v1/oauth/token"]}," endpoint upon expiration."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"nobr","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Appid"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Unique application identifier assigned by the Keeta platform. This value remains constant across all API calls made by your application."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"nobr","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Timestamp"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Unix timestamp in seconds representing the exact moment of API invocation."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"nobr","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Signature"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Cryptographic signature generated by applying the HMAC-SHA256 algorithm to the concatenated request parameters."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"2-signature-calculation","__idx":2},"children":["2. Signature Calculation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Step 1: Construct the string to participate in the signature calculation"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The components are concatenated in the following order to form the string used for signature calculation:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["url_without_query&Appid={Appid}&Authorization={accessToken}&Timestamp={Timestamp}&{sorted_query_parameters}&{request_body}&{AppSecret}"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Query parameters must be handled separately from the URL:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Split the request URL into ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["url_without_query"]}," and query parameters. The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["?"]}," separator is not included in the signature string."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Decode each query parameter key and value, then sort the parameters by key in ascending lexicographical order."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Join the sorted parameters as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["key1=value1&key2=value2"]},". Empty values must be retained as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["key="]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Append the sorted query parameters after ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Timestamp"]}," and before ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["request_body"]},", using ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["&"]}," as the separator."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["If the request has no query parameters, omit the query segment entirely."]}]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["Example 1: Request without ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorization"]}," Header, only for ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v1/oauth/token"]}," endpoint (with request body)"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"url: https://open.mykeeta.com/api/open/grocery/v1/oauth/token\nAppid: 123456\nTimestamp: 1767196800\nAppSecret: xyz\nrequest body:\n{\n    \"grantType\": \"client_credentials\",\n    \"clientId\": \"123456\",\n    \"clientSecret\": \"xyz\"\n}\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["The constructed signature calculation string is as follows:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"https://open.mykeeta.com/api/open/grocery/v1/oauth/token&Appid=123456&Timestamp=1767196800&{\"grantType\":\"client_credentials\",\"clientId\":\"123456\",\"clientSecret\":\"xyz\"}&xyz\n"},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["Example 2: HTTP GET request (without request body)"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"url: https://open.mykeeta.com/api/open/grocery/v1/order/chains/1297211/vendors/611469/orders?pageSize=50&page=1\nAppid: 123456\nAuthorization: abcdef\nTimestamp: 1767196800\nAppSecret: xyz\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The query parameters are sorted by key as follows:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"page=1&pageSize=50\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["The constructed signature calculation string is as follows:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"https://open.mykeeta.com/api/open/grocery/v1/order/chains/1297211/vendors/611469/orders&Appid=123456&Authorization=abcdef&Timestamp=1767196800&page=1&pageSize=50&xyz\n"},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["Example 3: HTTP POST/PUT request (with request body)"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"url: https://open.mykeeta.com/api/open/grocery/v1/product/update/chains/1297211/vendors/61146\nAppid: 123456\nAuthorization: abcdef\nTimestamp: 1767196800\nAppSecret: xyz\nrequest body:\n{\n    \"products\": [\n        {\n            \"sku\": \"TEST_SKU\",\n            \"active\": true,\n            \"price\": 10,\n            \"quantity\": 10,\n            \"baseWeight\": 1,\n            \"baseWeightUnit\": \"kg\",\n            \"pricePerBaseWeightUnit\": 1\n        }\n    ]\n}\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["The constructed signature calculation string is as follows:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"https://open.mykeeta.com/api/open/grocery/v1/product/update/chains/1297211/vendors/61146&Appid=123456&Authorization=abcdef&Timestamp=1767196800&{\"products\":[{\"sku\":\"TEST_SKU\",\"active\":true,\"price\":10,\"quantity\":10,\"baseWeight\":1,\"baseWeightUnit\":\"kg\",\"pricePerBaseWeightUnit\":1}]}&xyz\n"},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Step 2: Calculate HMAC-SHA256 Signature"]}]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Use the constructed signature string in step 1"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Use the provided AppSecret as key"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Calculate HMAC-SHA256 hash"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Encode the result in Base64 format"]}]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Step 3: Add the Signature to the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Signature"]}," Header"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Assign the generated signature to the Signature Header, and then submit the request."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["Example:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"JSON","header":{"controls":{"copy":{}}},"source":"\"Signature\": \"1hk2Wb1l/3Hvpn8UrH8XjPG4/hSucZMuuzu5dYCt6E4=\"\n","lang":"JSON"},"children":[]}]},"headings":[{"value":"Authorization Guide","id":"authorization-guide","depth":1},{"value":"1. General Specifications","id":"1-general-specifications","depth":2},{"value":"2. Signature Calculation","id":"2-signature-calculation","depth":2}],"frontmatter":{"seo":{"title":"Authorization Guide"}},"lastModified":"2026-08-28T10:07:13.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/apis/grocery/docs/auth","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}