NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: willieb on October 31, 2017, 08:41:31 AM

Title: Xero oAuth Issue
Post by: willieb on October 31, 2017, 08:41:31 AM
Hi Everyone,

I am battling a bit with the oauth on Xero.  When I post the following in the header I am just getting a "consumer key unknown" error.  I've checked the key about a 1000 times .. (feels like it) and used another key from another user with the same issue.  I assume there is an issue with my post header.

Anyone integrated with Xero already?  Any assistance to get the oauth sorted will be much appreciated!

Here is my header:

Authorization: OAuth realm="https://api.xero.com/api.xro/2.0/",
                oauth_consumer_key="GFMDO3R...................................VQIWVVMW",
                oauth_token="GFMDO3.....................................IWVVMW",
                oauth_signature_method="HMAC-SHA1",
                oauth_timestamp="137131201",
                oauth_nonce="7d8f3e4a",
                oauth_signature="bYT....................3D"

Thank you
Title: Re: Xero oAuth Issue
Post by: Bruce on November 01, 2017, 12:12:03 AM
Hi Willie,

What NetTalk build are you using? Are you using the OAuth support built into NetTalk or something else?

cheers
Bruce
Title: Re: Xero oAuth Issue
Post by: willieb on November 03, 2017, 10:48:59 PM
Hi Bruce,

I forgot to mention that I did check/test the demo on the OAuth Nettalk supplied demo and is working 100%, but this is for "public apps" on Xero.

I need to integrate with Xero with a "Private App" type connection.  With this type of connection there is no "approve/oauth window" and all the "handshaking" is done by die app.  This is where the app needs to get the token to start the API communication, and for some reason I keep on receiving the "consumer key unknown" error.

I am currently using Nettalk 10.08, upgrading to 10.09 in the next few days.

Thank you
Title: Re: Xero oAuth Issue
Post by: Bruce on November 06, 2017, 10:13:38 PM
Hi Willie,

can you point me at any Xero docs detailing "Private Apps" please?

cheers
Bruce
Title: Re: Xero oAuth Issue
Post by: willieb on November 07, 2017, 10:06:53 PM
Hi Bruce,

See below

Explanation of the different connection types => https://developer.xero.com/documentation/getting-started/api-application-types

Private app => https://developer.xero.com/documentation/auth-and-limits/private-applications

Regards