Skip to navigation

Fetch a script

Scripts are versioned text published from App Data. Fetch a script after sign-in. The SDK verifies the signed release before returning its content. Your app decides what to do with the text.

SDK version: V3 Beta. These examples use the current downloads. V1 and V2 use different APIs; choose them in the version selector.

Each example assumes app is the AuthlyX client you created in Connect your app. When a method takes a callback, AuthlyX calls it after the reply arrives. A name such as result inside that callback is created there; you do not declare it at the top of your file. For C++ futures, Python or JavaScript await, Java futures, Go errors and Rust ?, read Results.

app.getScript("welcome_message", result =>
{
if (result.ok)
Console.WriteLine(result.data.ToString());
else
Console.WriteLine(result.message);
});

A script delivered to a customer’s device can be inspected. Do not put secrets, private signing keys or server-only decisions in a script. Only request older revisions when your application has a reason to use them.