Docly Child

API issues

API issues are the main cases you can encounter when working with domain names. Each time the domain management is displayed or an action is requested on a particular domain name, an API call is done.

Each case is different and depends on a particular situation. For exemple:

  • A domain registration can fail because a data provided by the customer doesn’t fulfill the expected syntax
  • A nameserver change can fail because the nameservers provided by the customer are wrong
  • A bug in the module makes the API failing and a deeper debug is needed to understand what is requested by Blesta to the module and what the module requested through the API


Lets look at the following example:
A domain name is already registered and the client wants to update the whois information. For the administrative contact, he entered several non supported characters in the “Address 2” field:

Exemple of API issue Blesta

Once submitted, an error message is displayed to the user:

Error message Blesta

OK but what’s next? How to figure out the problem on your side?

Open the module logs at Tools > Logs, tab Modules and search after the action in the list based on the date/time. We found the following lines:

Blesta module logs

The first entry says that the module entered in the module function manageWhois with the parameters stored in the column “Data”. There is a lot but the important ones is:

[AdminFirstName] => John
[AdminLastName] => Doe
[AdminBodyName] =>
[AdminAddress1] => 264 avenue Arthur Notebart
[AdminAddress2] => wrong string syntax &e"'(-e_ca)=}$^u*$
[AdminCity] => LILLE
[AdminStateProvince] => 01
[AdminPostalCode] => 59160
[AdminCountry] => FR
[AdminPhone] => +33 123456789
[AdminEmailAddress] =>

We can see that “Address 2” was provided with “wrong string syntax &e”‘(-e_ca)=}$^u*$”

The second entry says that the module tried to create a new contact through the API with SOAP function contactcreate

But the result was:

E13 : Address : Some characters are not accepted (accents, symbols, ...)

Perfect, we found that the issue occurred because the client requested an update of the domain contact information with an address containing non supported characters.