My code is this:
<pre><?php
require_once ‘vendor/autoload.php’;
require_once ‘vendor/mashape/unirest-php/src/Unirest.php’;
phone=“phone number”;
pwd=“password of site2sms”;
// These code snippets use an open-source library. http://unirest.io/php
Unirest\Request::verifyPeer(false);
msg&phone=phone&pwd=pwd&uid=$uid",
array(
“Authorization” => “Basic ODgxNzM4ODE5NjpwcmF2ZWVuMjIwMA==”,
“X-Mashape-Key” => “my mashape key”,
“Accept” => “text/plain”
)
);
print_r($response);
?></pre>
When I am running this code I am getting following error:
<pre>Unirest\Response Object
(
[code] => 403
[raw_body] => {“message”:“Invalid Mashape Key”}
[body] => stdClass Object
(
[message] => Invalid Mashape Key
)
[headers] => Array
(
[0] => HTTP/1.1 403 Forbidden
[Content-Type] => application/json
[Date] => Sat, 25 Feb 2017 19:49:13 GMT
[Server] => Mashape/5.0.6
[X-Mashape-Proxy-Response] => true
[Content-Length] => 33
[Connection] => keep-alive
)
)</pre>
I tried to find solution for this in PHP but didn’t get any solution. Please provide solution for this issue asap.
Thanks in advance…
Join in the discussion - add comment below: