<div dir="ltr">You can ignore the ProcessTags() calls - essentially they just do variable substitution within the strings involved.<br><br>There is no login for private Xero apps, which are tied to a specific Xero organisation.  You need to setup your application on the Xero API end for that specific organisation, to generate the required key and secrets etc which you use to do the signing of your requests.<br>
<br><br><div>w.r.t Unicode, the code was written for deployment with a pre-Unicode Delphi compiler.  Some of the code was either written for or adapted from libraries which were or had been ANSI-fied to ensure consistent behaviour for use with Unicode versions of Delphi, but the remaining code otherwise assumes ANSI strings.  If you are using a Unicode Delphi version you should change <b>all </b>declarations to ANSIString to maintain the intended behaviour and be careful of implicit string conversions when making calls into the routines.<br>
<br>To make it properly Unicode enabled may involve more significant change than that.<div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 8 July 2014 11:43, Robert Martin <span dir="ltr">&lt;<a href="mailto:rob@chreos.co.nz" target="_blank">rob@chreos.co.nz</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div>Hi Cameron  <br>
      <br>
      Sorry to bug you but....  I have the code installed and compiling
      however I am a bit unsure as to the process involved.<br>
      <br>
      For Public apps you go through a process of logging in and getting
      a token.  <br>
      <br>
      For private applications do you just call the API you want and
      encode the call using &#39;OAuthSignRequest(fHTTP.Request, &#39;POST&#39;,
      lURL);&#39; or do you need to do some sort of log in as well?<br>
      <br>
      In the OAuthSignRequest method there are calls to a function
      called ProcessTags( as below...<br>
      <br>
         conkey    := ProcessTags(OAuthConsumerKey,    Locals, Partner);<br>
          consecret := ProcessTags(OAuthConsumerSecret, Locals,
      Partner);<br>
          tok       := ProcessTags(OAuthTokenKey,       Locals,
      Partner);<br>
          toksecret := ProcessTags(OAuthTokenSecret,    Locals,
      Partner);<br>
      <br>
      I guess this function would be in the classFloCommon.pas (not
      included) that we &#39;can easily replace&#39;.  Unfortunately I have no
      idea what this function does or what its inputs are asside from it
      returning a string and that all the parameters are globals !  Any
      hints?<br>
      <br>
      Sorry to be a pain but this OAuth stuff is like pulling teeth. <br><div class="">
      <br>
      <br>
      Cheers<br>
      Rob<br>
      <br>
      <br>
      <br>
      On 8/07/2014 9:54 a.m., Cameron Hart wrote:<br>
    </div></div>
    <blockquote type="cite"><div><div class="h5">
      
      
      
      
      <div>
        <p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">this

            code has been shared with Xero a while ago on their forum. 
            there’s a copy on <a href="ftp://ftp.flow.net.nz/RELEASE/Code/" target="_blank">ftp://ftp.flow.net.nz/RELEASE/Code/</a><u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
        <table style="width:525.0pt" cellpadding="0" width="700" border="0">
          <tbody>
            <tr style="height:26.25pt">
              <td colspan="4" style="padding:0cm 0cm 0cm 0cm;height:26.25pt">
                <p class="MsoNormal"><b><span>Cameron

                      Hart </span></b><span><u></u><u></u></span></p>
              </td>
            </tr>
            <tr>
              <td style="width:17.25pt;padding:0cm 0cm 0cm 0cm" width="23"><br>
              </td>
              <td style="padding:0cm 0cm 0cm 0cm">
                <p class="MsoNormal"><b><span>Flow

                      Software Limited </span></b><span><u></u><u></u></span></p>
              </td>
              <td rowspan="4" style="width:3.75pt;padding:0cm 0cm 0cm 0cm" valign="bottom" width="5">
                <p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><img src="cid:part2.09000908.06080805@chreos.co.nz" width="1" border="0" height="55"></span><span><u></u><u></u></span></p>

              </td>
              <td style="padding:0cm 0cm 0cm 0cm"><br>
              </td>
              <td style="padding:0cm 0cm 0cm 0cm"><br>
              </td>
              <td rowspan="4" style="padding:0cm 0cm 0cm 0cm">
                <p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><img src="cid:part3.03090008.08080306@chreos.co.nz" alt="Flow" width="158" border="0" height="38"></span><span><u></u><u></u></span></p>

              </td>
            </tr>
            <tr>
              <td style="padding:0cm 0cm 0cm 0cm"><br>
              </td>
              <td style="padding:0cm 0cm 0cm 0cm">
                <p class="MsoNormal"><span>PO
                    Box 302 768, North Harbour </span><span><u></u><u></u></span></p>
              </td>
              <td style="padding:0cm 0cm 0cm 0cm">
                <p class="MsoNormal"><b><span>P </span></b><span><u></u><u></u></span></p>
              </td>
              <td style="padding:0cm 0cm 0cm 0cm">
                <p class="MsoNormal"><span>+64 9
                    476 3569</span><span><u></u><u></u></span></p>
              </td>
            </tr>
            <tr>
              <td style="padding:0cm 0cm 0cm 0cm"><br>
              </td>
              <td style="padding:0cm 0cm 0cm 0cm">
                <p class="MsoNormal"><span>Auckland

                    0751, New Zealand </span><span><u></u><u></u></span></p>
              </td>
              <td style="padding:0cm 0cm 0cm 0cm">
                <p class="MsoNormal"><b><span>M </span></b><span><u></u><u></u></span></p>
              </td>
              <td style="padding:0cm 0cm 0cm 0cm">
                <p class="MsoNormal"><span>+64
                    21 222 3569 </span><span><u></u><u></u></span></p>
              </td>
            </tr>
            <tr>
              <td style="padding:0cm 0cm 0cm 0cm"><br>
              </td>
              <td style="padding:0cm 0cm 0cm 0cm">
                <p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><a href="http://www.flowsoftware.co.nz" target="_blank"><span>www.flowsoftware.co.nz

                      </span></a></span><span><u></u><u></u></span></p>
              </td>
              <td style="padding:0cm 0cm 0cm 0cm">
                <p class="MsoNormal"><b><span>E </span></b><span><u></u><u></u></span></p>
              </td>
              <td style="padding:0cm 0cm 0cm 0cm">
                <p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><a href="mailto:cameron.hart@flowsoftware.co.nz" target="_blank"><span>cameron.hart@flowsoftware.co.nz

                      </span></a></span><span><u></u><u></u></span></p>
              </td>
            </tr>
          </tbody>
        </table>
        <p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span><span><u></u><u></u></span></p>
        <table style="width:487.5pt" cellpadding="0" width="650" border="0">
          <tbody>
            <tr style="height:26.25pt">
              <td style="padding:0cm 0cm 0cm 0cm;height:26.25pt">
                <p class="MsoNormal"><span>This
                    message is intended for the addressee named above.
                    It may contain privileged or confidential
                    information. If you are not the intended recipient
                    of this message you must not use, copy, distribute
                    or disclose it to anyone. </span> <span><u></u><u></u></span></p>
              </td>
            </tr>
          </tbody>
        </table>
        <p class="MsoNormal"><span style="font-size:8.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#92c75f"> </span><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">
          </span><span style="font-size:8.0pt;font-family:Webdings;color:#92c75f">P</span><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">
          </span><span>Please
            consider the environment before printing this email</span><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">
          </span><span><u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> <u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
        <p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;" lang="EN-US">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;" lang="EN-US"> <a href="mailto:delphi-bounces@listserver.123.net.nz" target="_blank">delphi-bounces@listserver.123.net.nz</a>
            [<a href="mailto:delphi-bounces@listserver.123.net.nz" target="_blank">mailto:delphi-bounces@listserver.123.net.nz</a>]
            <b>On Behalf Of </b>Jolyon Smith<br>
            <b>Sent:</b> Tuesday, 8 July 2014 9:14 a.m.<br>
            <b>To:</b> NZ Borland Developers Group - Delphi List<br>
            <b>Subject:</b> Re: [DUG] Xero private API (OAuth)<u></u><u></u></span></p>
        <p class="MsoNormal"><u></u> <u></u></p>
        <div>
          <p class="MsoNormal">This was a nut I had to crack at Flow.  I
            was successful in this endeavour but I&#39;m not at liberty to
            share the fruits of those labors.  If you ask nicely
            however, Cameron might be willing to help.<u></u><u></u></p>
        </div>
        <div>
          <p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></p>
          <div>
            <p class="MsoNormal">On 8 July 2014 08:52, Robert Martin
              &lt;<a href="mailto:rob@chreos.co.nz" target="_blank">rob@chreos.co.nz</a>&gt;

              wrote:<u></u><u></u></p>
            <p class="MsoNormal">Hi<br>
              <br>
              I have been doing some work with the Xero API and have
              public OAuth<br>
              working fine.  However I actually need to use the private
              API which<br>
              requires RSA-SHA1  which I believe just means RSA signing.
               Is that correct?<br>
              <br>
              If so does anyone have any code examples of RSA signing, I
              have found<br>
              LockBox 3 which is supposed to do it but I just cant get
              it installed,<br>
              although the source has a XE2 project group the code is
              full of errors !<br>
              <br>
              I am looking at using the openSLL dll calls to do it
              myself as an<br>
              alternative but sample code is scarce. I will continue
              looking but if<br>
              anyone has any pointers I would be grateful :)<br>
              <br>
              Cheers<br>
              Rob<br>
              <br>
              _______________________________________________<br>
              NZ Borland Developers Group - Delphi mailing list<br>
              Post: <a href="mailto:delphi@listserver.123.net.nz" target="_blank">delphi@listserver.123.net.nz</a><br>
              Admin: <a href="http://delphi.org.nz/mailman/listinfo/delphi" target="_blank">http://delphi.org.nz/mailman/listinfo/delphi</a><br>
              Unsubscribe: send an email to <a href="mailto:delphi-request@listserver.123.net.nz" target="_blank">
                delphi-request@listserver.123.net.nz</a> with Subject:
              unsubscribe<u></u><u></u></p>
          </div>
          <p class="MsoNormal"><u></u> <u></u></p>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: <a href="mailto:delphi@listserver.123.net.nz" target="_blank">delphi@listserver.123.net.nz</a>
Admin: <a href="http://delphi.org.nz/mailman/listinfo/delphi" target="_blank">http://delphi.org.nz/mailman/listinfo/delphi</a>
Unsubscribe: send an email to <a href="mailto:delphi-request@listserver.123.net.nz" target="_blank">delphi-request@listserver.123.net.nz</a> with Subject: unsubscribe</pre>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><div class=""><p color="#000000" align="left">No virus
        found in this message.<br>
        Checked by AVG - <a href="http://www.avg.com" target="_blank">www.avg.com</a><br>
        Version: 2014.0.4716 / Virus Database: 3986/7813 - Release Date:
        07/07/14</p>
    </div></blockquote>
    <br>
  </div>

<br>_______________________________________________<br>
NZ Borland Developers Group - Delphi mailing list<br>
Post: <a href="mailto:delphi@listserver.123.net.nz">delphi@listserver.123.net.nz</a><br>
Admin: <a href="http://delphi.org.nz/mailman/listinfo/delphi" target="_blank">http://delphi.org.nz/mailman/listinfo/delphi</a><br>
Unsubscribe: send an email to <a href="mailto:delphi-request@listserver.123.net.nz">delphi-request@listserver.123.net.nz</a> with Subject: unsubscribe<br></blockquote></div><br></div>