I am signed up for origination and termination services with a username
and password, however I am unable to get the test provision API to
work with any of the API nodes I have created.
Here's the code I am using (copied from the forums):
-------8< snip-snip 8<-----------
<?php
//////////////////////////////////////////////////////
// Test of GetNumbers function of the VTWhite API
//////////////////////////////////////////////////////
$packet = "
<packet>
<auth>
<user>api_node_user</user>
<pass>api_node_pass</pass>
</auth>
<function>GetNumbers</function>
<data>
<npa>951</npa>
</data>
</packet>";
exec("curl -k -H \"Content-Type: application/x-www-form-urlencoded\" \
-d \"packet=$packet\"
https://api.vtwhite.com/provisioning...ioning.api.php 2> /dev/null", $h);
for ($i = 0; $i < count($h); $i++) {
$res .= $h[$i] . "\n";
}
print $res;
?>
-------8< snip-snip 8<-----------
I have substituted "api_node_user" and "api_node_pass" for the real user and password.
The response returned is:
<packet>
<data>
<success>FALSE</success>
<error>Not Authorized</error>
<return></return>
</data>
</packet>
Here's the API Node info:
Edit
Name IP Address Username Password 911 Action
DouglasGillettWeb 69.65.24.226 xxxxxxxx HIDDEN Y
I can add numbers manually and would like to get it working programatically.
Thank you for any help you can provide.