title: Odoo v12 API get invoice PDF
body: <p><a href="https://stackoverflow.com/questions/51404705/how-to-connect-or-login-with-odoo-using-c-sharp-code-and-after-connect-with-odo">This question</a> got me started with my C# Odoo API implementation. I have working code using CookComputing.XmlRpcV2 to retrieve a list of invoices. </p>
  
  <p>What I would like to implement is the option to retrieve/download a PDF of a selected invoice. Does anybody know what I would need to get this done?</p>
  
  <p>When I search, I find forum posts stating reporting doesn't work since V11, such as <a href="https://www.odoo.com/nl_NL/forum/help-1/question/how-to-retrieve-invoices-using-the-web-api-in-odoo-11-126433" rel="nofollow noreferrer">this one</a>. Neither do I see it mentioned in the online documentation for V12, although there is mention of it at the bottom of the page for V10.</p>
  
  <h3>Update</h3>
  
  <p>Someone mentioned to construct an URL:</p>
  
  <pre><code>http://localhost:8069/my/invoices/1?report_type=pdf&amp;download=true&amp;access_token=&lt;ACCESSTOKEN&gt;
  </code></pre>
  
  <p>Where <code>1</code> is the invoice ID. Technically this works, but requires me to be logged in to the portal using the browser. Even if I can log into the portal from my C# service, I do not know where/how to retrieve the correct access token. I can see this is in GUID form. Does anybody know whether this is the same token I could retrieve from the OAuth2 REST API (which is a paid module b.t.w.)?</p>