# Logout and Restart App button from within app

**URL:** <https://support.openanalytics.eu/t/logout-and-restart-app-button-from-within-app/2659>\
**Category:** ShinyProxy\
**Created:** [October 27, 2023, 7:50pm UTC](https://support.openanalytics.eu/t/logout-and-restart-app-button-from-within-app/2659 "2023-10-27T19:50:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kramerrs](https://support.openanalytics.eu/user_avatar/support.openanalytics.eu/kramerrs/32/793_2.png) [@kramerrs](https://support.openanalytics.eu/u/kramerrs)\
**Post date:** [October 27, 2023, 7:50pm UTC](https://support.openanalytics.eu/t/logout-and-restart-app-button-from-within-app/2659/1 "2023-10-27T19:50:20Z")

</div>

Is there a way to get the Logout URL or App Restart endpoint from within an app? We’re using flexdashboards which already has a navbar, I would like to save screen space, maybe have these in a drop-down menu from within the shiny app. I see in the thyme page it is a embedded with a dollar sign.

---

<div class="post-metadata">

**Author:** ![lsamson](https://support.openanalytics.eu/user_avatar/support.openanalytics.eu/lsamson/32/1099_2.png) [@lsamson](https://support.openanalytics.eu/u/lsamson)\
**Post date:** [August 6, 2024, 2:46pm UTC](https://support.openanalytics.eu/t/logout-and-restart-app-button-from-within-app/2659/2 "2024-08-06T14:46:20Z")

</div>

I would love to know if this is possible, because I have a similar use case. Did you find a solution for this in the meantime?

I tried to get a restart button within an app (see below), but it did not work since the required javascript function cannot be found from within the application:

```auto
tags$a(
  class="btn btn-primary btn-sm btn-restart-app",
  onclick="Shiny.instances.eventHandlers.onRestartInstance();",
  role="button",
  "Restart app"
)

```

In addition, I tried to add a button with `href='/logout'`, but that does not work when there is a custom logout url defined in the application.yml. Directly providing the logout-url seems to work, but is undesirable to hard-code it into the app. Is it possible to access the logout URL from the application.yml within an application?
