PDA

View Full Version : API Support


douglas_gillett
06-27-2008, 09:30 PM
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/testprovisioning.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.

douglas_gillett
07-08-2008, 10:20 PM
With the help of technician, Ken Kobin, this issue was resolved. Bottom line: the line with <npa>951</npa> had to be changed to be "exactly" like the example in the documentation: <state>DC</state> then it all worked like a champ!

Well, almost - the root IP address of the web server I was using wasn't the same as the IP address of the domain-name of the web site, so I had to create an API Node using the root IP address and *THEN* it was all good!

I have since migrated all the code to another web server which has better performance, so I asked customer support for the root IP address of the new server and they were happy to give it to me. I created a new API Node with identical user and pass but with the new root IP address, and the migration was transparent.

So, 1) make sure the API node has the Root IP address of the server making the API call and 2) make sure the code is *exactly* like the sample in the documentation (with the exception of the "user" and "pass").

Cheers!
-Doug Gillett
Panefree

kevinschelin
10-31-2008, 08:46 AM
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.

------------------------------------------------------------------

Translations (http://www.all-translators.com/translations.php) Self Certification Mortgage Quotes (http://www.self-cert-mortgage-centre.co.uk/self-certification-mortgage-quotes.html)

Etta Sapphire
06-15-2009, 01:27 AM
Hi,

The user may first configure a NetBeans platform for use in module development. For this workflow, a platform could be an installation of (some supported version of) the NetBeans IDE, or any application based on the NetBeans platform, e.g. a suitably new version of Java Studio Creator. There may be several platforms configured in the IDE at once; the platform selected for a given module (or suite of modules) is referred to as the target platform.