> This page is for version V3 - Beta (default).
> For other versions, use one of these documentation indexes:
> - V3 - Beta (default): https://docs.authlyx.dev/v3/llms.txt
> - V2 - Legacy: https://docs.authlyx.dev/v2/llms.txt
> - V1 - End of support: https://docs.authlyx.dev/v1/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.authlyx.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.authlyx.dev/_mcp/server.

# Fetch a script

> Fetch and verify a published script revision.

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](/v3/guides/quickstart). 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](/v3/sdks/methods/results).

#### C\#

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

#### C++

```cpp
app.getScript("welcome_message", [](auto result) {
    if (result.ok())
        std::cout << result.data.dump() << '\n';
});
```

#### Python

```python
app.getScript("welcome_message", completed=lambda result: print(result.data if result.ok else result.message))
```

#### JavaScript / Node.js

```javascript
app.getScript("welcome_message", result => {
    if (result.ok)
        console.log(result.data.content);
    else
        console.log(result.message);
});
```

#### TypeScript

```typescript
app.getScript("welcome_message", result => {
    if (result.ok)
        console.log(String(result.data.content));
    else
        console.log(result.message);
});
```

#### Java

```java
app.getScript("welcome_message").thenAccept(result -> System.out.println(result.ok() ? result.data() : result.message()));
```

#### Go

```go
script, err := app.GetScript(ctx, "welcome_message", 0)
if err != nil {
    return err
}
fmt.Println(script.Data)
```

#### Rust

```rust
let script = app.getScript("welcome_message", None).await?;
println!("{}", script.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.