## Manage Synapse Credentials

There are multiple ways one can login to Synapse. We recommend users to choose the method that fits their workflow.

library("synapser")
synLogin("username", "password")

### Use .synapseConfig

For writing code using the synapser client, that is easy to share with others, please do not include your credentials in the code. Instead, please use .synapseConfig file. You can refer your collaborators to the following documentation on how to set up a .synapseConfig file.

First, create a .synapseConfig file in your home directory with the following content:

[authentication]
apikey = your_apikey


You can choose to specify either username and password or username and apikey. For security purposes, we recommend that you use Synapse apikey instead of your password.

library("synapser")
synLogin()

### Letting the Operating System Manage Your Synapse Credentials

For users who would like to save their credentials and let other OS configured applications (like keychain in Mac) manage credentials for them, when logging in for the first time, use:

library("synapser")
synLogin("username", "password", rememberMe=True)

The application (keychain in Mac) will then prompt you to allow other applications including Python and R to access these credentials. Please choose “Yes” or “OK”.

library("synapser")
synLogin()