Forum Discussion
Just getting my head into this. I've made the changes to my app's authorisation URL and I do get the MYOB page come up that spells out what is being requested and invites the user to Connect. But when I do that I get a message that says "Something went wrong and we couldn't connect the app". Below that it says that I need to be an administrator on the company file to be able to connect. I'm not an admin and I'm not sure my client would want me to be an administrator - is there some mechanism in place to enable testing and development? Is this this app connection is a one-time thing, or will it happen every time? Can I do something in my developer account to get me past this? The app in question is registered in my account.
- Mike_James8 days agoUltimate Cover User
DavidDNCS , there is no other option, to authorise file access you must be a file admin. Your client can give you that role temporarily, and even make your file access read-only until authorisation is complete. (The authorisation from your app will still work).
That error message could also relate to an invalid redirect. There are much stricter rules about redirects now, as the API support write to me:
“validation of the redirect URI has been tightened. As a result, non-HTTPS, localhost-style, or internal hostnames (like http://desktop) may now be rejected during the final redirect step after consent. When that happens, it surfaces as a generic “unable to connect, something went wrong” message, which is what you were seeing”. (This strict application was not notified.
- MarshallArts8 days agoExperienced User
Thanks for this info, I am one more step along the way. I believe it was my http://desktop redirect URL that was the stumbling block, and changing it to https://desktop in my registration and in my code got me connected, I think. However I now have another problem: the code I get back in the businessID field is just a string. Where I make a call to the API in my .NET SDK code, I specify the company file as a CompanyFile object, as required. I can't see any variation on the call to specify the Company File as a string or a URI. Neither can I see any way to create a CompanyFile object from the string or a URI. In the past I have used the API to request a list of available Company Files and I get back a list. If there's only one I would just connect to it, otherwise I would show a dialog and let the user select. But this is all done at the MYOB end now, so it is not clear to me how to use this businessID in my .NET SDK code. If I try to use it, or a Uri created from it, in place of the CompanyFile object I have been obtaining up to now, the code will not even compile. The documentation on developer.myob.com still describes these Company File mechanisms and does not appear to have been updated for the granular scopes changes.
- MarshallArts6 days agoExperienced User
After spending more time on this it is even less clear. If, as stated above, the CompanyFile endpoint will be disappearing, will there even be CompanyFile objects in the .NET SDK? If not then then the SDK will need changes to all the calls that request data. If there will still be a CompanyFile object, there will need to be a way to derive one from the businessId that is returned by the new control flow. I've seen nothing about any changes to the SDK, I am using the latest version and its last change was about a year ago. What am I missing here?
- eJulia19 hours agoTrusted User
I have been getting that message for months. It was suggested that I might have not set up the redirect URL as https: but I picked that up and fixed it only a few days after the change was made.
I may say the change was made without warning and the documentation about it only went up on hte website a few days later.
I have test files that I am an admin user for so that is not a problem for testing but it still does not work.
I have had things work OK and then later, without changing any code I started to get that message. I suspect it may be because I have 4 versions which are slightly different and share a key/secret combination. I set up more but only one new one ever worked and I did not want to mess with the existing ones in case it broke things for existing users.
Looking for something else?
Search the Community Forum for answers or find your topic and get the conversation started!
Learn, solve, grow
Level up your skills and find answers across all MYOB products