Skip to navigation

Working with EU Hosting

EU Hosting gives Enterprise customers Webflow workspaces in a separate EU region. If your app or integration serves those customers, it needs to call the EU region with EU credentials.

This guide shows how to build an app that supports both the US and EU regions. For the host names and the features available in each region, see EU Hosting.

How regions affect your app

The Data API is the same in both regions, so your API calls don’t change. What changes is where you send them and which credentials you use:

  • Each workspace, site, and user account belongs to one region.
  • Each region needs its own registration of your app, with its own client ID and client secret.
  • An access token works only with the API of the region that issued it.

So your app needs to know each user’s region and run OAuth in that region. It also needs to store the region with the token, and send every request to that region’s API.

Approval for external EU users

As in the US region, a new EU registration is available only to users in your app’s workspace. External users can’t authorize it until Webflow approves it. The Webflow Marketplace isn’t available in the EU region, so ask your Webflow contact how to get your EU registration approved.

Build a region-aware app

These steps use JavaScript with Express. The same approach works in any language.

1

Register your app in each region

Register your app on webflow.com as usual. Then register it again from a workspace on eu.webflow.com. Use the same scopes, and set a redirect URI for your app.

Store the client ID, client secret, and redirect URI for each region as separate environment variables:

.env
WEBFLOW_US_CLIENT_ID=your-us-client-id
WEBFLOW_US_CLIENT_SECRET=your-us-client-secret
WEBFLOW_US_REDIRECT_URI=https://yourapp.com/callback
WEBFLOW_EU_CLIENT_ID=your-eu-client-id
WEBFLOW_EU_CLIENT_SECRET=your-eu-client-secret
WEBFLOW_EU_REDIRECT_URI=https://yourapp.com/callback
2

Define the regions in one place

Keep the hosts and credentials for each region in one object, so the rest of your code only passes a region key around:

regions.js
export const REGIONS = {
us: {
authorizeUrl: "https://webflow.com/oauth/authorize",
tokenUrl: "https://api.webflow.com/oauth/access_token",
apiBaseUrl: "https://api.webflow.com/v2",
clientId: process.env.WEBFLOW_US_CLIENT_ID,
clientSecret: process.env.WEBFLOW_US_CLIENT_SECRET,
redirectUri: process.env.WEBFLOW_US_REDIRECT_URI,
},
eu: {
authorizeUrl: "https://eu.webflow.com/oauth/authorize",
tokenUrl: "https://api.eu.webflow.com/oauth/access_token",
apiBaseUrl: "https://api.eu.webflow.com/v2",
clientId: process.env.WEBFLOW_EU_CLIENT_ID,
clientSecret: process.env.WEBFLOW_EU_CLIENT_SECRET,
redirectUri: process.env.WEBFLOW_EU_REDIRECT_URI,
},
};
3

Ask the user for their region

A user with an EU account can’t sign in through the US authorization page, so ask for the region before you start OAuth. For example, show two buttons:

<a href="/auth/us">Connect Webflow</a>
<a href="/auth/eu">Connect Webflow (EU workspace)</a>
4

Start OAuth in the user's region

Send the user to the authorization page for the region they chose. Save the region with the state value, so your callback knows which region issued the code:

server.js
import crypto from "node:crypto";
import { REGIONS } from "./regions.js";
app.get("/auth/:region", (req, res) => {
const regionKey = req.params.region;
const region = REGIONS[regionKey];
if (!region) return res.status(404).send("Unknown region");
const state = crypto.randomUUID();
req.session.oauth = { state, regionKey };
const params = new URLSearchParams({
response_type: "code",
client_id: region.clientId,
redirect_uri: region.redirectUri,
scope: "sites:read cms:read",
state,
});
res.redirect(`${region.authorizeUrl}?${params}`);
});
5

Exchange the code in the same region

Exchange the authorization code at the token endpoint of the region that issued it, with that region’s client ID and client secret. Then store the region with the access token:

server.js
app.get("/callback", async (req, res) => {
const { state, regionKey } = req.session.oauth ?? {};
if (!state || req.query.state !== state) {
return res.status(400).send("Invalid state");
}
const region = REGIONS[regionKey];
const response = await fetch(region.tokenUrl, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
client_id: region.clientId,
client_secret: region.clientSecret,
code: req.query.code,
grant_type: "authorization_code",
redirect_uri: region.redirectUri,
}),
});
if (!response.ok) return res.status(502).send("Token request failed");
const { access_token } = await response.json();
await saveConnection({
userId: req.user.id,
region: regionKey,
accessToken: access_token,
});
res.redirect("/dashboard");
});

saveConnection stands for your own storage. Keep the access token encrypted, as you would for any OAuth token.

Don't use the SDK OAuth helpers for EU users

The SDK OAuth helpers, such as WebflowClient.authorizeURL and WebflowClient.getAccessToken, always use the US hosts. Build the authorization URL and request the token yourself, as these steps show.

6

Call the API in the connection's region

When you call the API, create the client with the base URL of the connection’s region:

webflow.js
import { WebflowClient } from "webflow-api";
import { REGIONS } from "./regions.js";
export function webflowFor(connection) {
return new WebflowClient({
accessToken: connection.accessToken,
baseUrl: REGIONS[connection.region].apiBaseUrl,
});
}
const sites = await webflowFor(connection).sites.list();

For the Python SDK setup, see SDKs on the EU Hosting page.

Use site and workspace tokens

Scripts and internal integrations often use a site token or workspace token instead of OAuth. For an EU site, create the token in the site or workspace settings on eu.webflow.com. Then send your requests to https://api.eu.webflow.com/v2.

Your app may show links into Webflow or store asset URLs from the API. For EU users:

  • Link to eu.webflow.com, not webflow.com, for pages such as the dashboard.
  • Expect asset URLs on cdn.prod.eu.website-files.com. Don’t assume the US asset host when you parse or check asset URLs.

Test your integration

EU workspaces are invite-only. To test your app, ask your Webflow contact for access to an EU workspace. Then check that:

  • You can connect an EU workspace through the EU flow, and a US workspace through the US flow.
  • Requests for EU connections go to api.eu.webflow.com, and requests for US connections go to api.webflow.com.
  • Links and asset handling work for EU sites.

Troubleshooting

ProblemLikely causeFix
The EU API returns 401The US region issued the token.Connect the user through the EU flow, and send EU tokens only to the EU API.
The user can’t sign in on the authorization pageThe user’s account is in the other region.Send the user through the other region’s flow.
The token request failsThe client ID and token endpoint come from different regions.Use the EU client ID and client secret with the EU token endpoint.
EU users go to webflow.com to authorizeThe app uses the SDK OAuth helpers.Build the authorization URL from the EU host.
External EU users see no workspaces to authorizeWebflow hasn’t approved your EU registration yet.Ask your Webflow contact about approval.

Next steps