Guidelines
- Quick Start Guide
- Project Preparation
- Start Project
What is X-KM-Tran Token ?
KONA PLATE Open API verifies data integrity with the value of the X-KM-Tran Token.
When requesting an API, create an x-km-trans-token value and set the key and value to X-KM-trans-token in the Request Header and request a request.
The server generates an x-km-tran-token with the secret key of the requested message to verify data integrity by comparing it with the requested x-km-tran-token.
How to request X-KM-Tran Token
- After the project is created, a secret key is issued.
- Add Accept and Tran-Token values to the Request Header
Header Value Accept application/json X-KM-Tran-Token x-km-tran-token* Note: Refer to the section below for instructions on generating x-km-tran-token values using SHA256 HMAC
Sample Header
POST /open-api/api/v1/user/info HTTP/1.0
Host: sandbox.konaplate.com
Accept: application/json
X-KM-Tran-Token: KMV1:20221108120814608:uLD+mU8mz9K95neGiSJTSsF3zzAQJglCggZAOSs5Fkg=. - Request API after adding the remaining header values.
- Perform various scenario tests using the test data provided in the API document.
Create X-KM-Tran Token
To create a Tran-Token, create it in the following format:
- Prepare the issued secret key.
- Convert the body of the request to a string and prepare it as a message.
- Prepare the request time in yyyyyMMddHHmmssSS character format.
- Use SHA256 HMAC to generate characters.
- SHA256HMAC(secretKey, message)
- x-km-tran-token = "KMV1:" + Request time + ":" + SHA256HMAC(secretKey, message)
- After adding it to the header with the key value of the X-KM-Tran-Token, request a request by adding the value of the X-KM-Tran-Token.
Note: The Secret Key is a secret key created with the Access Key after the project is created.
Sample Code - X-KM-Tran Token
#Java