Base URLs and session headers power every browser-executed request. If this
step is wrong, backend tools and widget token refresh will fail.
Base URLs
Base URLs tell the widget where to send backend tool requests for each environment.
At minimum, create:
| Environment | Purpose | Example |
|---|
local | local development | http://localhost:8000 |
production | live environment | https://api.yourcompany.com |
The selected environment on Activate Agent is what powers the install snippet.
Session headers map values from browser storage into outgoing request headers.
Supported storage sources:
localStorage
sessionStorage
- JavaScript-readable
cookies
For each mapped header, the widget:
- reads the stored value from the browser
- builds the request header
- sends the backend tool request to your configured base URL
Widget -> Browser storage : read configured key
Browser storage -> Widget : token or value
Widget -> Widget : build request headers
Widget -> Customer API : fetch baseUrl + path
Customer API -> Widget : response
Start with authorization
In most setups, the first header should be:
- Header:
authorization
- Source: wherever your auth token is stored
- Key: the exact storage key name
If the header name is authorization, Warpy can format the value for you:
| Auth type | Sent value |
|---|
Bearer | Bearer <stored value> unless it is already prefixed |
Basic | Basic <stored value> unless it is already prefixed |
No prefix | the stored value exactly as-is |
How to find the right storage key
- Sign in to your product.
- Open browser DevTools.
- Check Application or Storage for
localStorage, sessionStorage, or cookies.
- Find the value your app uses for authenticated requests.
- If the stored value already includes
Bearer , use No prefix.
- If the stored value is just the raw token, use
Bearer.
Common mappings
| What your app stores | Source | Key | Header | Auth type |
|---|
| raw JWT token | localStorage | access_token | authorization | Bearer |
full Bearer ... string | localStorage | auth_header | authorization | No prefix |
| tenant or workspace id | cookies | tenant_id | x-tenant-id | not applicable |
Important cookie limitation
The widget can only map cookies visible to JavaScript through
document.cookie. If your auth cookie is HttpOnly, you cannot
extract it into a Session Header mapping.
If your app relies on same-origin cookies, normal browser cookie behavior may
still apply to same-origin requests. Session Header mappings are the explicit
path when you want deterministic header-based auth.
Cross-origin note
Warpy executes backend tool requests from the browser, not from a hidden server-side
proxy. The configured base URL must be reachable from the user’s browser and
compatible with your CORS and auth setup.
Recommended baseline
For the first launch:
- add
local and production
- map
authorization
- verify one backend tool manually
- only then continue to Features and tools