data
body
key
body
algorithm
body
# HMAC-SHA256 signature
curl -X POST https://tcpdata.com/hmac \
-H "Content-Type": "application/json" \
-d '{"data":"message","key":"secret","algorithm":"sha256"}'
# Verify webhook signature
curl -X POST https://tcpdata.com/hmac \
-H "Content-Type: application/json" \
-d '{"data":"webhook-payload","key":"webhook-secret"}'
const response = await fetch('https://tcpdata.com/hmac', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
data: 'API request body',
key: 'api-secret-key',
algorithm: 'sha256'
})
});
const result = await response.json();
console.log(result.hmac);
import requests
response = requests.post('https://tcpdata.com/hmac', json={
'data': 'API request body',
'key': 'api-secret-key',
'algorithm': 'sha256'
})
print(response.json()['hmac'])