Forum Discussion

kirsten's avatar
kirsten
Experienced User
4 months ago

MYOB.AccountRight.SDK.ApiValidationException 400 Bad request https://secure.myob.com/oauth2/v1/authorize

Has something happened to the above url recently?

 

I am using the SDK

The following code fails on the await.

 

 

        public async t.Task<CompanyFile[]> GetCompanyFiles(ApiConfiguration configuration, IOAuthKeyService authKeyService)
        {
            var cfsCloud = new CompanyFileService(configuration, null, authKeyService);
            // Await the SDK call and avoid capturing the UI context to prevent deadlocks
            return await cfsCloud.GetRangeAsync().ConfigureAwait(false);
        }

2 Replies

  • Isaiah_C's avatar
    Isaiah_C
    MYOB Moderator
    4 months ago

    Hi kirsten,

     

    Thanks for sharing the details. That error is definitely a tricky one. Hopefully someone from the community who's run into this before can jump in with some insight. If not, your best bet would be to reach out directly to the support team via developer.myob.com.

     

    Regards,

    Sai 

  • kirsten's avatar
    kirsten
    Experienced User
    3 months ago

    Thank you for the empathy Sai
    I got it working again with help from copilot telling me to separate getting the code from getting the company files

     

Looking for something else?

Search the Community Forum for answers or find your topic and get the conversation started!

Community home

Level up your skills using MYOB software.

 

Find help guides and technical solutions for all MYOB products here

Explore video tutorials for our software at the MYOB Academy here

 

Dig into MYOB Academy for free courses, learning paths and live events to help build your business with MYOB.