Fix for MYOB Cloud Authentication Issue
If you are experiencing issues authenticating with MYOB Cloud as a result of changes made by MYOB in mid August 2024 please follow the steps below to modify your fmAccounting Link (MYOB AccountRight Edition) v2 solution/integration to be compatible with the updates made by MYOB.
You can find the instructions for fmAccounting Link (MYOB AccountRight Edition) v1 here.
1 - Change the Redirect URL
Please enter the following URL in the Redirect URL field on the MYOB COMPANY screen as highlighted above:
https://www.databuzz.com.au
The previous default value for the Redirect URL field - http://desktop - no longer works with the changes made by MYOB. Make sure you copy/paste the URL exactly as it appears above - you will get an error about an invalid redirect URL if you do not enter this exactly as it appears above.
2 - MYOB Authentication - OAuth 2.0 Complete script changes
You will need to make a number of small changes to the MYOB Authentication - OAuth 2.0 Complete script as a result of the change to the Redirect URL above.
2.1 - change the calculation formula for the $response Set Variable step to:
GetLayoutObjectAttribute ( "myobAuthWebViewer" ; "source" )
2.2 - delete the $title Set Variable step as this is no longer required
2.3 - change the test for the code= parameter to:
not PatternCount ( $response ; "code=" )
2.4 - change the calculation formula for the $code Set Variable step to:
Let ( [ t1 = $response ; n1 = Position ( t1 ; "code=" ; 1 ; 1 ) ; n2 = Position ( t1 ; "&scope=" ; 1 ; 1 ) ; t2 = Middle ( t1 ; n1 + 5 ; n2 - n1 - 5 ) ] ; t2 ) // Let
2.4 - change the test for the state= parameter to:
PatternCount ( $response ; "state=" )
2.5 - change the calculation formula for the $state Set Variable step to:
Let ( [ t1 = $response ; n1 = Position ( t1 ; "state=" ; 1 ; 1 ) ; n2 = Length ( t1 ) ; t2 = Right ( t1 ; n2 - n1 - 5) ] ; t2 ) // Let
Save the script changes - you should now be able to successfully authenticate with the MYOB API using the FileMaker Web Viewer again.
If you have a current v2 Maintenance Agreement you can download an updated version of fmAccounting Link (MYOB AccountRight Edition) which includes these changes to the script.
You can download a PDF of the updated script for your reference here.