Generating an SDK token for Flutter SDK

🚧

Lokalise Flutter SDK is in beta

Please reach out to our Support team through the chat widget at lokalise.com (bottom right corner) if you want to try out the SDK.

📘

A new way to measure and manage updates over the air (OTA)

We’re improving how OTA usage is measured. Now based on gigabytes (GB) instead of monthly active users (MAU). In other words, based on how much data you use, not on how many active users you have. So you’re free to add as many app users as you like. The three factors that impact data usage are users, bundle size, and number of bundle releases.

Project ID, team ID, and JWT

Choose a Lokalise project that you will use with Flutter and OTA, or create a new one. Open your project, click More > Settings, and take a note of the project ID:

Now you'll have to request a JWT. You can use our API playground to achieve that. Simply paste your read/write API token into the Header field, enter your project ID, choose ota from the Service dropdown, and click Try it:

Copy JWT from the Response field.

Next, proceed to jwt.io and paste your JWT into the Encoded field. To the right you will see the the project you have access to and the corresponding team ID. Take a note of the team ID:

Generating an SDK token

🚧

You need to generate the token trough OTA API

Generating tokens trough Lokalise UI is not available during the beta.

🚧

If your project doesn't have any OTA bundles, you'll have to generate one.

Before proceeding, please follow the steps listed in the Generating bundles for Flutter SDK to create your first OTA bundle if your project doesn't have any generated bundles yet.

If your project does not have any generated bundles, you'll get an error "project not found" when trying to obtain an SDK token.

Finally, we have to generate a special SDK token that will be used to request OTA bundles from your Flutter app. To achieve that, proceed to the Create token endpoint in Lokalise API playground and fill in the following fields:

  • Authentication (Bearer) — paste your JWT here (not the API token!).
  • teamId — paste your team ID obtained on the previous step.
  • lokaliseProjectId — paste the chosen project ID.

Then click Try it and copy token from the response:


What’s Next