Xero not creating an invoice on trigger

Status: Closed · Asked by jonharris on · 0 views

jonharris — Question ·

Hi,

I've got a workflow setup to create an invoice in Xero whenever a WooCommerce order is placed.

I thought I had Xero connected and all setup correctly but I've just received the following error after a recent order was placed:

"Type": null,
"Title": "Unauthorized",
"Status": 401,
"Detail": "TokenExpired: token expired at 07/06/2022 02:26:21",
"Instance": "dfe06c8c-154f-4b27-9b7d-748602dad9e9"

Any suggestions on how to resolve this?
Thanks!
Jon

Pabblymember11 — Reply ·

Hey @jonharris

As we can see from your workflow, you are using a new connection with a new API token and once you generate the new token your previously used credentials of Xero wouldn't be intact.

So, kindly use the new credentials for all the Xero action steps you are using in your workflow.

jonharris — Reply ·

Hi @Supreme

Thanks for your reply. I've just had a look at my Xero connection in Pabbly... when I click the Connected button to reauthorise Xero I can see that I have a few existing connections to Xero, but my workflow is using the latest one.

Can you please clarify what it is that I need to do to fix this, as I'm not sure I fully understand what you mean?

Thanks!

Pabblymember11 — Reply ·

Hey @jonharris

Can you please clarify what it is that I need to do to fix this, as I'm not sure I fully understand what you mean?

To avoid such issues from your automation, you can use the new credentials for all the Xero action steps you are using in your workflow.

So, after you generate a new token in your Xero, your other and old credentials will not be intact at all.

E.g. -

jonharris — Reply ·

@Supreme

Thanks for the reply.
I do apologise, but I'm still not sure exactly what you mean...

I do understand that once a new Xero token is created, the old ones aren't valid.

However as I explained it looks to me like my workflow is using the latest Xero token, but obviously I'm not looking at the right thing - I'm very new to Pabbly and not familiar with the system at all.

So what I don't understand is how to fix my workflow and ensure the latest Xero token is being used? Can you please advise how to do this?

Thanks!
Jon

Pabblymember11 — Reply ·

Hey @jonharris

I do apologise, but I'm still not sure exactly what you mean...

I do understand that once a new Xero token is created, the old ones aren't valid.

However as I explained it looks to me like my workflow is using the latest Xero token, but obviously I'm not looking at the right thing - I'm very new to Pabbly and not familiar with the system at all.

So what I don't understand is how to fix my workflow and ensure the latest Xero token is being used? Can you please advise how to do this?

From Xeros' API, if you regenerate the API token again then the previously used API key will not be active at all.

So, once you try to generate your API key again, you need to change the connection from all the workflows and the Xero action steps.

This process is associated with the Xeros' API, so if you have any further queries related to this you can contact their support team.

Back to all forum threads · Log in to reply