I'm trying to import from WHMCS to a c# application all my WHMCS invoices using API methods. There is a problem when I try to download PDF Documents. There is no API method to do that and I can't call dl.php page without login. I can't login as admin with WHMCS API Methods, and neither with client because (obviously) I don't know their password and I have only their MD5 password.
There is any solutions?
Thanks
According to this page, this is how you can download the invoice without need to login.
Create a php file, let's say, gen_invoice_pdf.php, and place it inside the root whmcs directory.
Add this code to the file:
To download invoice id: 5, visit the url:
http://whmcs-example.com/gen_invoice_pdf.php?id=5&us=myuser&pw=mypass
Note: this will be accessible to any one knows the url, you can set the page accept connections from specific IP address, for example.
Update:
Added WHMCS admin authentication, works only for WHMCS >= 5.3.9, check: Admin Password Hashing.