HMAC Security Hash (optional)
HMAC Security Hash
Our server will always add a custom header, X-Ayetstudios-Security-Hash, containing a SHA256 HMAC hash of the request parameters and your publisher api key. Your API key can be found in your dashboard at ayetstudios.com under settings.
To verify the hash, perform the following steps:
Get all request parameters
Order the request parameters alphabetically
Build and compare the HMAC hash using the ordered request parameter string and your API key
PHP Example:
Example HMAC calculation
Assuming the below is the callback we sent to you:
1) Get all request parameters
Strip away your domain and order the request parameters alphabetically.
In this example the parameters are already ordered alphabetically.
2) Order the request parameters alphabetically
This is the ordered request parameter string for the HMAC hash calculation:
Your API Key from the ayeT dashboard:
3) Build and compare the HMAC hash using the ordered request parameter string and your API key
Hashing the ordered request parameter string with your Secret Key (API Key) with SHA256, you will get the following HASH Key:
Compare the HASH Key you calculated to the X-Ayetstudios-Security-Hash our server will always add as custom header for each conversion.
Last updated