Problem with api action from server connect

Hi, i am trying to use api action from server connect and i have an error:

code: 0
file: “/var/www/html/anofmnou/dmxConnectLib/modules/api.php”
line: 224
message: “Failed to connect to 2a01:7080:24:100::666:30: Network is unreachable”

the page is: https://www.anofm.ro/apilmv.html

May i get some help, please? Thks.

The message is very clear, the network cannot be reached. This could be because the IP address is incorrect, it could also be because the IPv6 value is not recognised. Have you tried using IPv4 or the name value of the address?

Sorry but, from the same laptop and browser, the direct connection (from browser) works fine, so…
I think that the module api.php try to connect useing IPv6; is this configurable?

“message”:“Failed to connect to 2a01:7080:24:100::666:30: Network is unreachable”

2a01:7080:24:100::666:30 is a IPv6 adress, i need to connect to IPv4…

I hoped that adding CURL_IPRESOLVE_V4 => TRUE in curl_setopt_array in the module api.php will solve the issue, but id didn’t…
No ideea from nobody? I realy need this to be done…

I still can’t manage this and I badly need it.
I maked 2 files:

  1. https://www.anofm.ro/apieures.html with API action in server connect
  2. https://www.anofm.ro/apieures2.html with API action in the client
    The first file respond that message: Failed to connect to 2a01:7080:24:100::666:30: Network is unreachable
    The second file use the same API but in client, may connect to the Request URL (i need to change manualy OPTIONS into GET and Accept-Language: en). But it works, it can connect.
    Why isn’t the first solution (with API Action server connect) working, cannot connect to the Request URL?
    Please help…

Just either specify IPv4 address of your IP or remove the IPV6 address from your DNS (the AAA record)
As your server can’t find it

Where should I specify the IPv4 address of my IP?

Just in the API connector where you have entered the remote address - use xxx.xxx.xxx.xxx instead of the name.

So, you mean to specify the IPv4 of the remote adress…

Yes as your server seems to have trouble resolving ipv6 addresses.