OVH Cloud OVH Cloud

API AlexaWebInfoService

1 réponse
Avatar
FB
Bonjour les pros !

Est-ce que qqn a deja reussi a se connecter a l'api alexa en wsdl via
PHP et la classe nusoap ?

J'utilise ceci :

Code:

$url = urldecode($_REQUEST['url']);
$date = date('Y-m-d') . 'T' . date('H:i:s') . substr(date('O'),0,3)
. ':' . substr(date('O'),3);

$soapclient = new
soapclient('http://awis.amazonaws.com/AWSAlexa/AWSAlexa.wsdl', 'wsdl');


$proxy = $soapclient->getProxy();
$params = array(
'Service' => 'AlexaWebInfoService',
'Operation' => 'UrlInfo',
'AWSAccessKeyId' => $keyID,
'Signature' =>
base64_encode(mhash(MHASH_SHA1,'AlexaWebInfoServiceUrlInfo'.$date,$secretKey)),

'Timestamp' => $date,
'Url' => $url,
'ResponseGroup' => 'UsageStats'
);

$result = $proxy->UrlInfo($params);



Il me semble que je respecte pourtant toutes les spécifications
définies ici
http://www.amazon.com/gp/aws/sdk/main.html?s=AlexaWebInfoService&v=1-0&p=RequestAuthentication

Le problème est que j'obtiens invariablement la reponse suivante :

The identity contained in the request is not authorized to use this
subscription id.

Mes $keyID et $secretKey sont pourtant bons..

1 réponse

Avatar
FB
Je me reponds a moi meme :) Le code est bon, j'avais simplement oublie
de m'inscrire au service en question, ici AlexaWebInfoService...