3 years ago
401 Unauthorized error
Hi, I am able to access my company file however, I am getting "401 Unatuthorized" when trying to get customer details. I am using MYOB SDK and passing my user credentials and request as below
var credential = new CompanyFileCredentials("{myusername}", "{mypassword}"); var response = await customerService.GetRangeAsync(companyFile, "", credential);
Please note, oauth is working and I can access my company file.
Request URI generated by above code as below
"https://arl2.api.myob.com/accountright/{companyID}/Contact/Customer/?"
I have tried many different options as well, such as
Username: "" Password: ""
Moreover, I can access my file online using app.myob but I can't see in AccountRight desktop app. I can see only Sandbox.
Any help will be much appriciated.
Thanks
Shiva