Table of Contents

LIFF App Management

LiffClient is the facade for the LIFF management API. Unlike Messaging, LIFF uses a single host (api.line.me) and a small, closed surface (2 paths, 4 operations), so the client wraps it completely with convenience methods. For anything lower-level, LiffClient.Api exposes the generated builders directly.

using Line.OpenApi.Liff;
using Line.OpenApi.Liff.Generated.Models;

var liff = LiffClient.CreateWithStaticToken("CHANNEL_ACCESS_TOKEN");

List apps

GetAllLiffAppsResponse? apps = await liff.GetAppsAsync();

Add an app

AddLiffAppResponse? added = await liff.AddAppAsync(new AddLiffAppRequest
{
    View = new LiffView { Type = LiffView_type.Full, Url = "https://example.com" },
});
string liffId = added!.LiffId!;

Update an app

await liff.UpdateAppAsync(liffId, new UpdateLiffAppRequest { Description = "updated" });

Delete an app

await liff.DeleteAppAsync(liffId);

Dependency injection

using Line.OpenApi.Liff.DependencyInjection;

services.AddLineLiff(o => o.ChannelAccessToken = "CHANNEL_ACCESS_TOKEN");
// resolve: sp.GetRequiredService<LiffClient>()

See Dependency Injection & Hosting for the auth-provider overload (for example to inject a refreshing token provider).