docs icon indicating copy to clipboard operation
docs copied to clipboard

Invalid Signature OVH' s SMS

Open HADDADENICAR opened this issue 5 years ago • 0 comments

I am trying to send SMS using OVH'SMS service , following this docs.

when i test the send with post methode for the url https://eu.api.ovh.com/1.0/sms/sms-zj16668-1/jobs

i get an

errorCode:INVALID_SIGNATURE

the signature is calculated as below :

        String signature = "$1$" + HashSHA1(AS + "+" + CK + "+" + METHOD + "+" + QUERY + "+" + BODY + "+" + TSTAMP);

with Get method(no Body) i get a successful result , however when i change to use a Post method with a Body ,the above error is triggered.

this is the Body i pass to signature :

        string BODY = @"{  ""receivers"": [ ""+33601020304"" ], ""message"": ""Test SMS OVH"", ""senderForResponse"": true}";

what i m doing wrong ?

#update i found in the ovh community a similar issue and the solution where to use TLS1.2 PROTOCOL , however even after adding this proposed line of code:

 ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | (SecurityProtocolType)768 | (SecurityProtocolType)3072;

I am still getting the same error ! ?

HADDADENICAR avatar Jan 27 '20 14:01 HADDADENICAR