How do I give Retool access to a Cloud Functions endpoint that requires authentication?

I have a Cloud Functions endpoint where we handle authentication by checking the Firebase User’s token in the Authorization header of the request. This works fine for users of our app who all have signed in with Firebase auth–we just get the token from the firebase auth info client-side and send it along with the request.

But I want to allow Retool to fetch data from this endpoint as well.

I’ve added Retool as a service account in the Google Cloud Platform console, but is there a way to generate a JWT for the Retool that I can then validate in my Cloud Function?

Hey @blesstech and welcome to the community! If you’re using the REST API connector, you can pass anything through headers. For JWTs we don’t have native support for re-generating tokens automatically (see How to Refresh JWT Token with Custom Auth and JWT Authentication of REST API) so generally Retool users hardcode them into the header of their request. Retool also supports custom auth flows which you might be able to work with. Let me know if this helps!