8

I just want to ask about shiny accounts, I have two shiny registered accounts and now when I want to deploy I saw error like this

Do you want to proceed with deployment? [Y/n]: y
Error: Please specify the account which you want to deploy the application to (there is more than one account registered on this system).

So my question is how to specify the account that I want to used it in deploy application, when I just tried to run like this

    shinyapps::setAccountInfo(name='xxxx', 
                              token='13SDADASDSADAD9FCCEC48C016D5D97',
                              secret='863pLqbfaxeradasdafasfsadxzadadXgi2NfXh')
setwd('D:/ASD/test')
library(shinyapps)
deployApp()

I still got same error.

halfer
  • 19,824
  • 17
  • 99
  • 186
user46543
  • 1,033
  • 4
  • 13
  • 23

5 Answers5

7

Go to top menu your Rstudio-> Tools-> ShinnyApps -> Manage Accounts

rischan
  • 1,553
  • 13
  • 19
6

There are mainly two different parameters to set up: the name and the account, each used in a different function. Previous answers did not make this altogether clear, so let me add explanations.

Step 1: Set name via setAccountInfo():

Go to https://www.shinyapps.io/admin/#/dashboard and get your personal name/token/secret, e.g. "myName" / "myToken" / "mySecret". You'll need all three to authorize your account.

library(shiny)
library(rsconnect)
rsconnect::setAccountInfo(
    name = "myName", 
    token = "myToken",
    secret = "mySecret")

You're now ready to deploy your apps. If you have a single account, that is all you need to do. But with multiple accounts, you also need to set the account explicitly in the deployApp() function:

Step 2: Set account via deployApp():

setwd("my/local/dir/") # or set the full path below
rsconnect::deployApp("myAppNameOffline", 
    appName = "myAppNameOnline", 
    account = "myname") 

Bonus: If you set option appName explicitly your app can have a different name online as it does offline, e.g. "myapp-version-999" can simply become "myapp" online.

PatrickT
  • 10,037
  • 9
  • 76
  • 111
2

If you have multiple accounts on shinyapps.io, specify the account name while deploying the app

  1. get a list of accounts
  2. deploy it to the desired account

    accounts(server = NULL) shinyapps::deployApp('./AppPath',account='second_account_name')

d2a2d
  • 1,176
  • 10
  • 12
2

Use the following command to remove all the accounts

removeAccount("user")

Then, add reconfigure your rsconnet using the follwoing functions

rsconnect::setAccountInfo(name, token, secret)
user145962
  • 339
  • 2
  • 2
1

In RStudio go to: Tools => Global Options => Publishing and remove useless users.

wykopowiedz
  • 71
  • 2
  • 12