2

I have integrated XERO with my php(codeigniter) website, everything i have implemented is working just fine. I want to send the invoice through an email i have created.

I am using XeroOAuth.

//This line is working properly
$response = $this->XeroOAuth->request('GET', $this->XeroOAuth->url('Invoices/'.$invoiceId, 'core'), array(), "", 'pdf');


//but cant send email through xero api
$send_email = $this->XeroOAuth->request('POST', $this->XeroOAuth->url('Invoices/'.$invoiceId.'/Email', 'core'), array() );

As their documentation explain that, this line of code should trigger the xero send mail option, but its returning error 401

Rashed Ehsan
  • 119
  • 6

1 Answers1

1

try using XERO PHP and you can easily send invoice using,

$invoice->sendMail();
ABTanjir
  • 126
  • 5