I’m wrestling with the Xero API but hit an early problem. I’ve successfully connected to it using Postman and have retrieved an invoice record successfully there. I’ve copied all the credentials into my Server Connect actions but it’s giving me a 500 error:
Error: unauthorized_client : Unknown client or client not enabled
Yes, initially I did it through app connect and the console showed it stuck at the API stage with status ‘pending’ so I then browsed directly to the .php file and that’s what gave me the Xero page showing:
Error: unauthorized_client : Unknown client or client not enabled
If you manage to get this working @sitestreet please post a step by step guide.
I gave up trying to get OAuth2 Server Connect and Xero working.
I managed to call the login to my Xero tenant, but was struggling with redirect_uri and retrieving contacts
Where are you seeing this? On xero side, or when u open the server action file? I see you have enabled ssl verify, so is the action file opening as https?
Wahey! I have it working! I tried so many different things, I’m not actually sure what fixed it. I am now onto the next bit in the process and once I have that all working, I’ll try and post a how-to.
Hey @sitestreet ,
I hope you are keeping well.
Did you manage to get Xero integration up and running.
I never did quite get anywhere with it and just revisited it with no success.
Would love to see a guide on how to get Wappler connected with Xero.
I’ve just done some comparisons with the site I built and the Client Id and Client Secret fields in the OAuth2 Provider needs to be completed. I’m trying to remember where I got these from but must be in the Xero account.
Also, make sure you’ve added all the scopes you need. I have 7 in total: offline_access, accounting.transactions, openid, profile, email, accounting.contacts, accounting.settings.
Thanks @sitestreet
I have managed to setup the OAuth2 connector and to Authorize which loads the login to xero to authenticate page. This is successful, but errors with…
{"status":"500","message":"Http status code 400. {\"error\":\"invalid_client\"}","stack":"Error: Http status code 400. {\"error\":\"invalid_client\"}\n at IncomingMessage.<anonymous> (E:\\inetpub\\wwwroot\\Xero\\lib\\oauth\\index.js:95:39)\n at IncomingMessage.emit (events.js:205:15)\n at endReadableNT (_stream_readable.js:1154:12)\n at processTicksAndRejections (internal/process/task_queues.js:84:9)"}