Check authentication status for custom API

I implemented custom API authentication as detailed here: https://docs.tryretool.com/docs/custom-api-authentication and it works great!
The only issue is that users sometimes forget to the click the “Login with My Admin API” button before attempting other actions, and then those actions fail mysteriously. Is there a way to determine whether a user is logged in to the custom API, so if they’re not logged in I can display a message and/or disable the buttons that require authentication?

We are looking for a way to do this too. Our tokens expire after 1 hour, so having the box automatically popup after it has expired would be nice.

Also, would be nice to have some default API calls run after a user has successfully authenticated.

1 Like