myDATA servers are down or unreachable. Please try again later
Hello,
I'm getting the above error as a catch in MyDataException when try to use $responses = $sender->handle($invoices);
I wonder if it's a problem from MyData or it's my problem. How Could I test it?
Thanks you in advance.
Hi, it's exactly what the error says. Unfortunately, myDATA dev environment has been unreachable in the past several days.
Although, I just tested it and seems to be working properly now.
that is the problem I stacked. I can't figure out why I'm getting this exception.
Would you mind sharing some details on your setup?
I also checked credentials with validateCredentials() and everything it's ok
Which is the simplest way to check connection with aade? Before using sendInvoices or other function
You can try to retrieve your invoices:
<?php
require_once __DIR__ . '/vendor/autoload.php';
use Firebed\AadeMyData\Exceptions\MyDataException;
use Firebed\AadeMyData\Http\MyDataRequest;
use Firebed\AadeMyData\Http\RequestTransmittedDocs;
$userId = 'user-id';
$subscriptionKey = 'subscription-key';
$env = 'dev';
MyDataRequest::init($userId, $subscriptionKey, $env);
try {
$requestTransmittedDocs = new RequestTransmittedDocs();
$transmittedInvoices = $requestTransmittedDocs->handle();
// To get the XML response
echo $requestTransmittedDocs->getResponseXML();
foreach ($transmittedInvoices as $invoice) {
// Process each invoice
}
} catch (MyDataException $e) {
echo $e->getMessage();
}
I got exactly the same message!
the row that creates exception is:
try { $responses = $sender->handle($invoices);
What else should I Check?
If you set a timeout make sure it's not too low. If that's not the case can you please post the whole stack trace?
What do you mean by "the whole stack trace?"
is this helpful;
#Software: Microsoft Internet Information Services 10.0 #Version: 1.0 #Date: 2025-05-16 11:18:18 #Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken 2025-05-16 11:18:18 172.21.10.6 GET / - 443 - 185.79.190.5 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/136.0.0.0+Safari/537.36 https://erpmydatadev.toradirect.gr/ 200 0 0 610 #Software: Microsoft Internet Information Services 10.0 #Version: 1.0 #Date: 2025-05-16 13:36:40 #Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken 2025-05-16 13:36:40 172.21.10.6 GET / - 443 - 185.79.190.5 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/136.0.0.0+Safari/537.36 https://erpmydatadev.toradirect.gr/ 200 0 0 662 2025-05-16 13:36:48 172.21.10.6 GET / - 443 - 185.79.190.5 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/136.0.0.0+Safari/537.36 https://erpmydatadev.toradirect.gr/ 200 0 0 104 2025-05-16 13:47:53 172.21.10.6 GET / - 443 - 185.79.190.5 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/136.0.0.0+Safari/537.36 https://erpmydatadev.toradirect.gr/ 200 0 0 192 2025-05-16 13:47:58 172.21.10.6 GET / - 443 - 185.79.190.5 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/136.0.0.0+Safari/537.36 https://erpmydatadev.toradirect.gr/ 200 0 0 186
If you run the following code (after replacing the user-id and subscription-key) you will get an exception. Can you please post all the exception output here? Just make sure you are not exposing any sensitive data. It will also print the endpoint url, can you post it too?
<?php
require_once __DIR__ . '/vendor/autoload.php';
use Firebed\AadeMyData\Http\MyDataRequest;
use Firebed\AadeMyData\Http\RequestTransmittedDocs;
$userId = 'user-id';
$subscriptionKey = 'subscription-key';
$env = 'dev';
MyDataRequest::init($userId, $subscriptionKey, $env);
$requestTransmittedDocs = new RequestTransmittedDocs();
echo $requestTransmittedDocs->getUrl();
$requestTransmittedDocs->handle();
Hello and thank you very much for your help!
url printed is: https://mydataapidev.aade.gr/RequestTransmittedDocs
also attached exception text.
You are probably using localhost without SSL/TLS. Please try disabling the client verification before the call:
MyDataRequest::verifyClient(false);
Full snipppet:
<?php
require_once __DIR__ . '/vendor/autoload.php';
use Firebed\AadeMyData\Http\MyDataRequest;
use Firebed\AadeMyData\Http\RequestTransmittedDocs;
$userId = 'user-id';
$subscriptionKey = 'subscription-key';
$env = 'dev';
MyDataRequest::init($userId, $subscriptionKey, $env);
MyDataRequest::verifyClient(false); // <= Add this line
$requestTransmittedDocs = new RequestTransmittedDocs();
echo $requestTransmittedDocs->getUrl();
$requestTransmittedDocs->handle();
Only do this when you are on dev and localhost.
I have already did it 1-2 days before. I did it again now but the same result.
Any other idea?
If I could help in order to help me!
with localhost and same code I get no exception and talking normally with MyData.
In this case, I have created a subdomain to an IIS server where cerificates are ok. I have checked it.
And either with "MyDataRequest::verifyClient(false);" or without I am getting "Connection refused". The question is why...
It seems like there's an SSL certificate problem with your site. When I visited toradirect.gr, Chrome displayed a certificate error - the certificate is actually issued for opap.gr, not your domain. This mismatch could be preventing secure connections.
Also, you should check if there are any network restrictions on your server. Try connecting via SSH and run this command to make sure DNS resolution is working properly:
nslookup mydataapidev.aade.gr
It's also worth checking if your server's firewall is blocking outbound connections. Let me know what you find after checking these issues!
Edit: You can also run this command via SSH
curl -v https://mydataapidev.aade.gr/RequestTransmittedDocs?mark=
You should see something like
curl : { "statusCode": 401, "message": "Access denied due to missing subscription key. Make sure to include subscriptio
n key when making requests to an API." }
thank you for your patience and your help.
We are talking about a windows server so I have already call on browser - https://mydataapidev.aade.gr/RequestTransmittedDocs and I get the following:
I am going to check with ssh as you said and I will get back
Since your DNS resolution is working, basic curl access is successful, and the certificate is valid, the problem might to be specifically related to how Guzzle/PHP is trying to connect to the service.
Try this:
[!CAUTION] This will expose your user-id and subscription-key. Be EXTREMLY careful before posting anything here.
MyDataRequest::init($userId, $subscriptionKey, $env);
MyDataRequest::setRequestOptions([
'verify' => true, // Try both true and false
'debug' => true, // Enables debugging and exposes credentials
'curl' => [
CURLOPT_SSL_VERIFYPEER => 1,
CURLOPT_SSL_VERIFYHOST => 2,
]
]);
$requestTransmittedDocs = new RequestTransmittedDocs();
$requestTransmittedDocs->handle();
I finally managed to proceed! Some php settings were needed based on your instructions for curl etc. Thank you once again
That's wonderful! Glad to help.