Learn R Programming

synapseClient (version 1.14-0)

setApiCredentials: setApiCredentials

Description

Sets the user name and secret key used to sign authenticated web requests to Synapse.

Usage

setApiCredentials(username, secretKey)

Arguments

username
The user's name, i.e. email address
secretKey
The secret key, retrieved from a previously authenticated session using hmacSecretKey().

Details

Setting the user name and secret key provide an alternative to logging in with a password. This authentication method does not use an expiring token (rather each request has a time-limited digital signature based on the non-expiring secret key) and is therefore useful for long running jobs.

See Also

synapseLogin hmacSecretKey

Examples

Run this code
## Not run: 
# 	synapseLogin("user.name@sagebase.org", "foo", mode="hmac")
# 	key <- hmacSecretKey()
# 	synapseLogout()
# 	setApiCredentials("user.name@sagebase.org", key)
# 	# you may now make authenticated requests to Synapse
# ## End(Not run)

Run the code above in your browser using DataLab