Skip to main content
Goal: Link Slack (or another toolkit) for two different end users without mixing tokens. In the dashboard, the same idea is the End user switcher — see External users switcher. On the API, you pass that identity as x-username. With the SDK, use asUser / as_user or the username constructor option.

Prerequisites

Steps

1

Pick stable usernames

Choose one username per end user in your product (for example customer_alice, customer_bob). Use the same string every time for that person — in x-username, when you create them in the dashboard, and when you link accounts.
2

Link for alice

The response includes an OAuth URL. Open it in a browser, approve access as Alice’s Slack workspace, then return to your app. If customer_alice did not exist yet, Flowra creates that external user.
3

Link for bob

Same call with customer_bob (curl x-username, or asUser('customer_bob') / as_user("customer_bob")). Complete OAuth with Bob’s Slack workspace.
4

Run in the right context

When you execute a workflow or tool for Alice, always send x-username: customer_alice (or use the scoped SDK client). Omit the header only when you intentionally want the project default user.The same header also scopes Knowledge and Table collections per end user — not only Slack connections.

Verify

  • List connected accounts once for alice and once for bob — each list should show that user’s Slack link, not the other’s.
  • Or in the dashboard: switch End user to each username under Connection and confirm separate rows.
  • Execute a Slack-backed tool or workflow for Alice; confirm Bob’s workspace is never used.

Next