Skip to content

connectUser() and connectApiUser() connect your Posit Connect account to the rsconnect package so that it can deploy and manage applications on your behalf.

connectUser() is the easiest place to start because it allows you to authenticate in-browser to your Posit Connect server. connectApiUser() is appropriate for non-interactive settings; you'll need to copy-and-paste the API key from your account settings.


connectApiUser(account = NULL, server = NULL, apiKey, quiet = FALSE)

  account = NULL,
  server = NULL,
  quiet = FALSE,
  launch.browser = getOption("rsconnect.launch.browser", interactive())



A name for the account to connect.


The server to connect to.


The API key used to authenticate the user


Whether or not to show messages and prompts while connecting the account.


If true, the system's default web browser will be launched automatically after the app is started. Defaults to TRUE in interactive sessions only. If a function is passed, it will be called after the app is started, with the app URL as a parameter.

See also

Other Account functions: accounts(), setAccountInfo()