Archived from the Transloadit support forum. Originally posted on March 4, 2014; details may be outdated, see our docs for current behavior. Original thread
Hi, I’ve followed the instructions in the API docs and I’m using the example PHP code for creating the signature but I get an INVALID_SIGNATURE error:
$authKey = 'REDACTED';
$authSecret = '<my-secret>';
$expires = gmdate('Y/m/d H:i:s+00:00', strtotime('+1 hour'));
$params = json_encode(array(
'auth' => array(
'expires' => $expires,
'key' => $authKey
)
));
$params = str_replace('\/','/', $params);
$signature = hash_hmac('sha1', $params, $authSecret);
And the I add the signature field to the request (or as a hidden field in form) but always get INVALID_SIGNATURE. What am I doing wrong??