1. My goal:
I am embedding a Retool app inside my React application and need to securely pass multiple tokens along with other parameters (user_id, home_id, org_id) to Retool.
2. Issue:
Currently, I am passing parameters via URL like this:
https://domain.retool.com/embedded/public/APP_ID/user-details?app_base_url=http://localhost:3000
&user_id=...
&home_id=...
&hs_access_token=...
&org_id=...
&has_other_token=....
This works fine with a single token.
However, when I try to pass two tokens (both large JWTs) in the URL, I get:
414 Request-URI Too Large (nginx)
3. Steps I've taken to troubleshoot:
-
Tried passing both tokens via URL → fails with 414
-
Tried using
postMessagefrom React → Retool listener sometimes doesn’t receive the message reliably (likely timing issue) -
Tried reducing params → works only when token size is small
-
Confirmed Retool app is embedded (
/embedded/public/...) and embedding is enabled
4. Additional info:
-
React app runs on:
http://localhost:3000 -
Retool app is embedded via iframe
-
Tokens are JWT (large in size)
-
Use case requires both tokens in Retool for different APIs
Question:
What is the recommended and reliable way to pass multiple large tokens from a React app to an embedded Retool app?
-
Is there a supported pattern for passing secure data (like tokens) to embedded apps?
-
Should this be handled via backend/session exchange instead of URL/postMessage?
-
Is there any Retool-native solution for this use case?
Expected outcome:
A scalable and production-safe way to pass multiple tokens to an embedded Retool app without hitting URL limits or unreliable messaging.