Common API Examples and Errors
Common API Examples
|Title:||registerDomain method under DomOrder class of Domains kit|
|Description:||The registerDomain method accepts complex variable/parameters whose usage cannot be easily illustrated using HTML forms. Hence, this feature cannot emulated from within your Reseller Control Panel through the Settings -> API -> Emulate API Calls -> Domains API Kit Emulator interface.|
|Solution:||An example of XML sent and received for this method is provided below for reference.|
Common API Errors and their Solution
|Title:||Sending Integers as numbers rather than as strings|
|Description:||Due to the limitations of Java, we cannot accept integers (e.g. 1) as numbers in a hash, rather they must be sent to us as strings (i.e. "1"). This is a recurrent problem when using the PHP Kit since PHP puts in Integers as plain numbers (in a hash).|
|Solution:||Ensure that you're sending in numbers as strings.|
|Title:||Incorrect Parent ID|
|Description:||An incorrect parent id is passed when trying to connect to the server.|
|Solution:||Pass the correct parent id. You might be passing the one for demo while connecting to the live environment, or vice-versa.|
|Title:||Maximum Number of Connections to the Registry Exceeded|
|Description:||When too many users send commands to the same Registry using a particular Registrar's connections, then an error would be displayed.|
|Solution:||This is a temporary issue and you need to simply try after sometime. Since the Registry provides each Registrar with a set number of connections, when these get exhausted an exception is thrown.|
|Title:||Error received when making https calls using the .NET API Kit|
|Description:||You may receive an error when trying to make an https call using our .NET API Kit since your .NET API Client needs to set a system security property to allow the system to accept SSL certificates.|
You need to add a class in your project (or the .NET Examples that we provide) having the following lines of code:
The code will allow the system to accept all kinds of certificates whatsoever. If you want the system to accept only a specific certificate, then you need to modify the code of the function CheckValidationResult above accordingly.
Also the user needs to include the following line of code before making the any function call to the https URL:
We would suggest that you include the above line in the NetAPI.vb class constructor.
After performing all the above steps, you would be able to make the https calls using the .NET API Kit without any error.