Erreur API SMS OVH
... / Erreur API SMS OVH
BMPCreated with Sketch.BMPZIPCreated with Sketch.ZIPXLSCreated with Sketch.XLSTXTCreated with Sketch.TXTPPTCreated with Sketch.PPTPNGCreated with Sketch.PNGPDFCreated with Sketch.PDFJPGCreated with Sketch.JPGGIFCreated with Sketch.GIFDOCCreated with Sketch.DOC Error Created with Sketch.
Question

Erreur API SMS OVH

by
Sadlig
Created on 2017-03-22 21:16:20 (edited on 2024-09-04 14:12:32) in Sms & Fax-old

Bonjour,

Voilà j'ai créé mes accès API de manière normale via cette URL : https://api.ovh.com/createToken/index.cgi?GET=/sms&GET=/sms/*&PUT=/sms/*&DELETE=/sms/*&POST=/sms/*

Ensuite j'ai copié le code d'exemple présent sur le dépôt Github d'OVH : https://github.com/ovh/php-ovh-sms

J'ai donc ce code :

$Sms = new SmsApi( $applicationKey,
$applicationSecret,
$endpoint,
$consumerkey);
print_r($Sms->getAccounts());

Qui me retourne cette erreur :

`Uncaught GuzzleHttp\Exception\ClientException: Client error response [url] https://api.ovh.com/1.0/sms/ [status code] 400 [reason phrase] Bad Request in /home/gildas/public_html/test_api_sms2/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:89`

Je ne sais pas trop d'où peut provenir le problème, je penche pour un souci du côté de l'API d'OVH mais impossible d'en être certain.

J'ai ouvert un ticket, je serais etonné d'avoir une réponse, ici aussi d'ailleurs.

Bonne soirée.


1 Reply ( Latest reply on 2017-03-23 11:56:29 by
DamG
)

Bonjour Sadlig,

Tu as bien suivi l'intégralité de la page Github, jusqu'a l'étape : "Send a test message without specifying a sender using php-ovh-sdk" ?

Avec ceci par exemple :

$applicationKey = "your_app_key";
$applicationSecret = "your_app_secret";
$consumerKey = "your_consumer_key";
$endpoint = 'ovh-eu';

Cordialement,

DamG