How to run shinycannon using an RStudio Connect API key instead of a password?

I know it may be a stretch to ask this here, but I am trying to use the package shinyloadtest with shinycannon to test the load of some applications I have in RStudio Connect. I am following the recipe present in [https://rstudio.github.io/shinyloadtest/].

This works fine, except that in the shinycannon step I am asked to store my RSC password and user in an env variable in order to authenticate against the app (because it is a login protected app). This is undesirable for many reasons and I imagine that it could be possible to use a RSC token instead, however I could not find the documentation for it. Does anyone know if this is actually possible?

Otherwise (and I should probably open another topic for that), is it possible to change the access of an app publish in RStudio connect (say, from All users- login required to All users- no login) through the RSC API?

Thanks!

1 Like

Apologies for the delayed response here!

This is a wonderful question. I did a bit of spelunking into the shinyloadtest code and at first blush, it unfortunately does not look like this is possible. While we're at rstudio::conf, I may try to find someone more knowledgable than I to verify that this is indeed the case, though!! I definitely think this is an approach that we should support in the package!

Hi @cole!

Thanks a lot, appreciated! I followed a bit the conference stream and it's cool to see people doing great works with R. Hope you can figure this one out for me!

1 Like

Hi , Im trying to run some loadtests on connect hosted shiny apps.
However, in terminal, shinycannon gives me an error :

ERROR [thread00] - RStudio Connect API key expected with this recording, please provide one using the -K option

When I try use the -K option I get an error:
shinycannon: unrecognized option '-K'

Have you any experience of this?

I also tried setting up an environment variable in the terminal SHINYCANNON_CONNECT_API_KEY
Any tips appreciated.
Vincent

1 Like