Custom Authorization Setup
Configure automatic token fetching, placeholder injection, and refresh token flows for your APIs — no tokens ever exposed to end users.
How it works
Widget initialises and sends user info to StrikeUp
StrikeUp calls your token endpoint with configured headers / body
StrikeUp extracts the token from the response using your configured path
The token is encrypted and stored — never visible client-side
Every API call automatically carries the token in the configured header
On 401, StrikeUp silently refreshes the token and retries — once
Authorization Types
None
No authorization headers are sent. Use for public APIs.
Static Headers
Fixed headers applied to every request. API key goes here — stored once, injected automatically.
Dynamic Headers
End users provide their own credentials (e.g. their personal API key). StrikeUp prompts them once and stores their input securely.
Custom Auth Endpoint
StrikeUp calls your token endpoint automatically. No user input required (unless you add custom placeholders). Best for OAuth-style flows where the token must be fetched server-side.
Custom Auth Endpoint — Full Setup
Step-by-step configuration for automatic token fetching.
Step 1 — Token Endpoint
Provide the URL StrikeUp will call to obtain an access token. Choose the HTTP method your endpoint requires (POST is most common).
Step 2 — Request Headers
Add any headers your token endpoint requires. Use the
{secret}placeholder — it will be replaced with the encrypted secret value you configure below.
Step 3 — Request Body
Configure the JSON body sent with the token request. Built-in placeholders:
Placeholder / setting
Value / description
{secret}
Your encrypted secret value
{userId}
The end user’s ID
{companyId}
Your company / tenant ID
{myPlaceholder}
Any custom placeholder you define
Step 4 — Custom Placeholders (optional)
If your token request needs per-user values that StrikeUp doesn’t know (e.g. a tenant slug or environment name), add custom placeholders. Users will be prompted for these values once, and StrikeUp stores their answers securely.
Example — two custom placeholders:
Key
Label shown to user
tenantId
Your Tenant ID
environment
Environment (prod / staging)
Use them in the body with curly braces:
Step 5 — Response Path
Paste a sample response from your token endpoint and click the field containing the access token — or type the dot-notation path directly.
Step 6 — Authorization Header
Configure how the extracted token is sent with every API call.
Placeholder / setting
Value / description
Header name
Authorization
Header format
Bearer {token}
{token}is replaced with the extracted value at request time.
Refresh Token Configuration
Enable automatic token refresh so expired access tokens are renewed silently — no user disruption, no failed requests.
When a tool call returns HTTP 401, StrikeUp automatically calls your refresh endpoint, stores the new access token, and retries the original request — once.
Refresh Token Path
The dot-notation path to extract the refresh token from the initial auth response. StrikeUp stores this token securely — it is never exposed to the client.
Refresh Endpoint
The URL and HTTP method StrikeUp calls when the access token expires. Set request headers and body using these placeholders:
Placeholder / setting
Value / description
{refresh_token}
The stored refresh token
{secret}
Your encrypted secret
{userId}
The end user’s ID
{companyId}
Your company / tenant ID
New Access Token Path
The dot-notation path to extract the new access token from the refresh response. Leave empty to reuse the main token path. If the refresh response also includes a new refresh token, it is automatically stored (rolling refresh tokens supported).
Complete Example
Injecting Credentials via Embed Code
If your token endpoint requires per-user values (custom placeholders), you can inject them directly from your embed script — so users never see an authorization prompt.
Security note: Only inject non-sensitive values (tenant IDs, environment names) via the embed script. Never inject raw API keys or passwords here — use the Secret field in the admin panel instead, which is encrypted server-side and never exposed to the browser.
Common Issues
❗ Token fetch fails on widget load
Wrong endpoint URL or HTTP method
Secret value not set or wrong
Request headers missing Content-Type
Fix: Check Authorization Logs in the admin panel — the full request and response are recorded.
❗ 401 on every API call (no refresh configured)
Access token expired before use
Token path is wrong — extracted value is empty
Fix: Paste a sample response into the Response JSON field and use the path selector to pick the correct field.
❗ Refresh token not stored
Refresh Token Path not configured
Path is wrong — field not found in initial response
Fix: Check the dot-notation path against your actual token endpoint response. Use the path selector.
❗ Refresh succeeds but API still returns 401
New token path differs between token and refresh responses
Refresh endpoint returns the token under a different key
Fix: Set a dedicated New Access Token Path in the refresh section instead of leaving it empty.