php - `SignatureDoesNotMatch` Response from AWS of Alexa Top Sites Service -


i referring alexa top sites developer guide , using their sample codes, both php , ruby. getting following signaturedoesnotmatch error:

<?xml version="1.0"?> <response><errors><error><code>signaturedoesnotmatch</code><message>the request signature calculated not match signature provided. check aws secret access key , signing method. consult service documentation details. </message></error></errors><requestid>28c6b028-c4b6-66a2-f5d8-70d8dc21b8f8</requestid> </response> 

i tried 2 different access keys same user , signed alexa web information service, no luck. tried scripts on both mac os 10.9 , 10.10, time settings set automatically updated.

in php code part generates signature:

/**  * generates signature per rfc 2104  *  * @param string $queryparams query parameters use in creating signature  * @return string             signature  */ protected function generatesignature($queryparams) {     $sign = "get\n" . strtolower(self::$servicehost) . "\n/\n". $queryparams;     echo "string sign: \n" . $sign . "\n\n";     $sig = base64_encode(hash_hmac('sha256', $sign, $this->secretaccesskey, true));     return rawurlencode($sig); } 

i not sure doing wrong.

i figured out that. root aws user able make request not iam user created. guess root user has access alexa service not iam user.


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -