Journal Posting Working On Test Environment But Getting Unauthorized on Production

34 views Asked by At

We're posting journal reports to Xero on the trial Xero account

Everything is working fine locally and on a test environment (When deployed).

But when deployed to the production environment, we're unable to get the access-token therefore getting an unauthorized response.

I've shared the demo account details below.

Company (Demo): company name

App name: dev-test

client_id: 13*****************23

Time zone: GMT +1 WAT

Sample Request Payload

{"lineAmount":-6000,"accountCode":"901"}

{"lineAmount":6000,"accountCode":"631"}

Sample Response

{"Type":null,"Title":"Unauthorized","Status":401,"Detail":"AuthenticationUnsuccessful","Instance":"61b04110-6b52-4b8f-81de-910eee892e97","Extensions":{}}

We're using .Net to implement and we're able to get the refresh-token and access-token successfully on test environment.

Please what could be the issue why it's not working on the production environment ?

Thanks.

1

There are 1 answers

2
sallyhornet On

Can you check the formatting of your headers as the instance id shows the error "There was no Bearer present in the Authorization header" in Xero's logs