All Collections
Versions 3.0 and 2.0
Implement
All Products
Getting Flatfile to work on International Servers
Getting Flatfile to work on International Servers
Elisa Dinsmore avatar
Written by Elisa Dinsmore
Updated over a week ago

This article is for Flatfile's Portal 2.0, Portal 3.0, and Workspaces. If you'd like to check out the latest version of the Flatfile Data Exchange Platform, click here!

The instructions here apply only to customers who have a Flatfile account set up in in a region other than the United States. If you would like help setting up Flatfile on an account outside the United States, please contact Support@Flatfile.com for help.

For Flatfile Portal 3.0

When you embed your Portal, you'll be using the following code for the Portal:

export function importData() {  Flatfile.requestDataFromUser({    });}

In your code, please replace that line with these 3 lines, which include additional variables:

export function importData() {  Flatfile.requestDataFromUser({    apiUrl: "[API-URL-HERE]",    mountUrl: "[APP-URL-HERE]",  });}

The international API URLs are:

The international app URLS are:

And that's it! Once those changes are made, everything should work smoothly.

For Flatfile's Platform SDK Starter

After you have installed the Platform SDK Starter, you will need to update the API URL it is using in order to deploy to one of our international servers.

To do so, edit the .env file stored in your root directory for the Platform SDK Starter, and update the FLATFILE_API_URL= to match the API URL of the server you will be deploying to.

It can also be passed to the publish command via the --api-url option.

The international API URLs are:

For Flatfile Portal 2.0

Setting up Flatfile Portal 2.0 on Flatfile’s international servers is a simple two step process.

  1. Add a few lines of code to your importer configuration

  2. Update your license key to your new international key

Configuring the Importer

To enable Portal 2.0 to work on Flatfile’s international servers, you will need to add a few lines of additional code to your importer configuration. The additional code looks like this (where “INTERNATIONAL-URL-HERE” is replaced by the correct international URL for your region):

FlatfileImporter.setMountUrl(    "https://portal-2.flatfile.io/?key=:key&domain=[INTERNATIONAL-URL-HERE]"    );    

Within the importer, it looks like this:

importFlatfileImporterfrom"@flatfile/adapter";import$from"jquery";import { format, isDate, isFuture, parseISO } from"date-fns";importcountriesfrom"../countries";import { schemas } from"./schemas";const { contactSchema } =schemas;constimporter=newFlatfileImporter(    "5e4ak4ka-f00b-5b0a-aa09-eab0cbe7acb6",    contactSchema);FlatfileImporter.setMountUrl(    "https://portal-2.flatfile.io/?key=:key&domain=[INTERNATIONAL-URL-HERE]");importer.setCustomer({    userId: "12345",    name: "Foo Bar"});

The international URLs are:

Updating the License Key

Next, update your license key to your new EU key. To find your EU key, log in to your account using the appropriate international URL and click the Portal link in the navigation pane. In the Portal tab, click on the link under "Looking for your Portal 2.0 license key? Go here" and you'll see a box with your license key. Copy and paste that value into your code.

Did this answer your question?