XeroAPI / Xero-NetStandard

A wrapper of the Xero API in the .NetStandard 2.0 framework. Supports Accounting, Payroll AU/US, and Files
MIT License
126 stars 124 forks source link

Forbidden in request on server, working fine on local #425

Open Anmol16q opened 2 years ago

Anmol16q commented 2 years ago

I've tried it says forbidden Pls check try {

            //ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
            var xeroToken = (XeroOAuth2Token)await _XeroClient.RequestXeroTokenAsync(code);

            List<Tenant> tenants = await _XeroClient.GetConnectionsAsync(xeroToken);
            Tenant firstTenant = tenants[0];
            TokenUtilities.StoreToken(xeroToken);
        }
        catch (Exception ex)
        {
        }

in call back error code I've checked code and state are coming

rlayhbrian commented 2 years ago

Hello! Which Xero organisation did you try to connect may I ask?

Anmol16q commented 2 years ago

I've only one organisation .. which I am selecting .. and only one App .. that should not be a problem..

I have VM starting 111.XXXXX.X3.241:7070... is it causing the problem.. It is working fine in local machine ...

Is absence of a domain name causing the error ..pls help

RettBehrens commented 2 years ago

Please could you contact Xero's API Support team using this link https://developer.xero.com/contact-xero-developer-platform-support and include your client id and date and time of the last error (and the timezone)