Konaplate logo

Guidelines

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

  1. After the project is created, a secret key is issued.
  2. 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=.

  3. Request API after adding the remaining header values.
  4. 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: 

  1. Prepare the issued secret key.
  2. Convert the body of the request to a string and prepare it as a message.
  3. Prepare the request time in yyyyyMMddHHmmssSS character format.
  4. Use SHA256 HMAC to generate characters.
  5. SHA256HMAC(secretKey, message)
  6. x-km-tran-token = "KMV1:" + Request time + ":" + SHA256HMAC(secretKey, message)
  7. 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