πAuthentication
Last updated
Last updated
Authorization is an important step to using Open API. To be able to authenticate the store, you must generate a X-PGPrints-Hmac-Sha256. first of all you must have Secret Key.
Back in the Key Management section in the app, click the Generate Key button to get the secret key and copy the key
Make X-PGPrints-Hmac-Sha256 very simple by following steps:
Converts body value to a JSON string
Use the newly obtained secret key to make the key code
Use Json String body to the plain text
Use Sha256 to algorithm
Generator X-PGPrints-Hmac-Sha256
This is my code in some language:
Other: Use the website to generator Sha256: https://www.devglan.com/online-tools/hmac-sha256-online
Open the website, press the F12 key and then select the Console section to convert body value to a JSON string:
Copy the above JSON into the Enter Plain Text to Compute Hash field of the website:
Enter the secret key generated above in the Enter the Secret Key field:
Select Cryptographic Hash Function: SHA-256, Output Text Format: Base 64 and click the Computer Hash button to get the Hash for the API: