...
You can log in to the Synapse command line, Python or R clients using a personal access token instead of your username and password. Using a token is highly recommended over a username and password since a token can be easily revoked if it is compromised. Additionally, each token can be scoped so that it only grants permission to certain parts of your Synapse account, whereas your username and password have access to your whole account.
...
To increase the security of your Synapse account, you can enable two-factor authentication (2FA). Synapse utilizes uses a time-based one-time password approach, which is supported by many applications, such as Google Authenticator, Duo Mobile, Microsoft Authenticator, and Authy. Enabling 2FA on your account may be required to access certain sensitive datasets.
...
For cases where entering a 2FA code is not possible, such as in automated jobs that interact with Synapse using the programmatic clients, you can use Personal Access Tokens, which will not prompt for a 2FA code.
Resetting 2FA
If you find yourself without access to your authenticator app, you can reset your two-factor authentication (2FA) using the Backup Codes.
In the event that you do not have access to both your authenticator app and backup codes, follow these steps to reset your 2FA:
Log in to https://accounts.synapse.org/ by entering your password or completing the OAuth flow.
Click on "Lost access to your codes?"
Click the button, and an email will be sent to the address associated with your account to reset your 2FA.
Deactivating Your Account
...