Security codes and apps for two-factor authentication

I needed to refresh my Samsung Note 4 phone, and the Teamviewer app now requires the two-factor authentication code to continue setup. I go to the Teamviewer profile page to de-activate two-factor authentication temporarily, but it will not accept my 16 digit code. It requires a 6 digit code. How can I fix this? thanks.