Closed domsle closed 3 years ago
This is due to with_shiny()
actually beginning to be deprecated in favour of gar_shiny_*
functions, I should update documentation to help, but you can work around it via this, which will add the token to the environment checked by search_analytics()
:
sc_data <- reactive({
req(auth())
with_shiny(
search_analytics,
siteURL = 'https://code.markedmondson.me/',
startDate = as.Date("2020-06-01"),
endDate = as.Date("2020-06-07"),
dimensions = c("date"),
searchType = "web",
rowLimit = 200,
dimensionFilterExp = NULL,
shiny_access_token = scr_auth(auth()) # add the reactive token to the googleAuthR auth environment
)
})
What goes wrong
When requesting search_analytics() using with_shiny() in a authenticated shiny app, the function does not recognise existing authentication, and throws this error:
Steps to reproduce the problem
app.R:
Expected output
Expectedly this would show me both list of websites, and any output from search_analytics.
Actual output
Running this chunk:
Caused this error to occur:![image](https://user-images.githubusercontent.com/18559095/88930437-cb30ba00-d27b-11ea-862c-a5a4c3f05f44.png)
options(googleAuthR.verbose=2)
:Session Info
Thank you for your help in advance!