Connections — reusable authentication for HTTP requests
Connections let you store authentication credentials once and reuse them across all your outgoing HTTP request templates. Hubhus handles token fetching and renewal automatically — including OAuth 2.0 access tokens — so you never have to manage expiry manually. Note: this applies to outgoing requests from Hubhus to external services. The Hubhus API itself does not support OAuth.
TL;DR
Go to Account → Integrations & API → Connections and click + New connection. Choose an auth type, fill in your credentials, and save. Then select the connection on each HTTP request under Connection / Authentication. Hubhus renews OAuth tokens automatically.
Get started in 4 steps
Open Connections
Go to Account → Integrations & API → Connections and click + New connection.
Name and choose auth type
Give the connection a clear name (e.g. GoGift Production). Select one of the supported auth types: Basic auth, Bearer token, OAuth 2.0 · Client Credentials, or OAuth 2.0 · Authorization Code (with PKCE).
Enter credentials and save
Fill in the fields for the chosen auth type. For OAuth 2.0 · Client Credentials: enter the Token URL, Client ID, and Client secret — leave Scopes, Audience, and Custom token params empty unless required by the provider. Click + Create. Hubhus confirms with status Connected.
Select the connection on each HTTP request
Open your HTTP request template and select the connection under Connection / Authentication. Do not set an Authorization header manually — Hubhus injects the correct credentials automatically on every request.
Read more⌄
Auth types — field reference
None
No authentication. Use for public endpoints that require no credentials.
Basic auth
Fields: Username, Password. Hubhus sends a standard HTTP Basic Authorization header on each request.
Bearer token
Field: Bearer token. Paste a static token, or reference an External API key using the {**api_key_slug**} placeholder syntax — useful for rotating or environment-specific keys stored in Hubhus.
OAuth 2.0 · Client Credentials
Server-to-server flow. No user login required. Fields:
- Discovery URL — optional. Paste the provider's homepage or .well-known URL and click Autodiscover to fill Token URL and scopes automatically.
- Token URL — the provider's token endpoint
- Client ID — from the provider
- Client secret — from the provider, kept confidential
- Scopes — space-separated, leave empty if not required
- Audience — leave empty if not required
- Custom token params — one
key: valueper line, leave empty if not required
Hubhus fetches an access token automatically before each request and renews it when it expires. You never need to manage token expiry manually.
OAuth 2.0 · Authorization Code (with PKCE)
User-delegated flow. Requires a browser login step where a user grants access to an external service. Fields include Discovery URL (optional), Authorize URL, Token URL, Revocation URL (optional), Client ID, Client secret, Scopes, Custom token params, and Custom authorize params. Click Save & Connect to authorize in one step.
Reusability and maintenance
A connection is shared across all HTTP request templates that reference it. If credentials change — for example a new client secret — update the connection once and every linked request picks up the change automatically. No need to edit individual request templates.
For OAuth 2.0, Hubhus stores the token internally and re-fetches it transparently when it expires. This means integrations like GoGift, which issue short-lived tokens, continue working without any manual intervention.
Troubleshooting
Connection does not show "Connected" after saving
For OAuth 2.0 · Client Credentials, Hubhus tests the Token URL immediately. If it fails, check that the Token URL is correct for your environment (production vs. sandbox), and that Client ID and Client secret are entered correctly.
HTTP request still fails with 401 after selecting the connection
Confirm that no manual Authorization header is set on the request — this can conflict with the injected token. Remove any manual authorization header.
Bearer token: want to use a rotating key
Store the key as an External API key in Hubhus and reference it using {**api_key_slug**} in the Bearer token field. Update the External API key value whenever it rotates — no need to edit the connection.
Common searches
OAuth • OAuth 2.0 • connection • authentication • Bearer token • Basic auth • Client Credentials • HTTP request • token refresh • access token • PKCE
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article