Class LiffClient
Facade for the LIFF management API. It wraps a single-host (api.line.me) Kiota client and provides the priority use case "list / add / update / delete LIFF apps" through thin convenience methods.
Unlike Messaging, there is no data-plane host, so no host override (BaseUrl) is needed and the generated default of api.line.me is used as-is. For lower-level operations, the generated builders are directly accessible via Api.
Design note (the intent behind the asymmetry with Messaging): LIFF is a small closed surface of 2 paths and 4 operations, so convenience methods can cover it completely. Messaging has many endpoints where complete coverage is impractical, so it exposes the generated builders directly. This difference is not an inconsistency but a decision scaled to the size of the surface.
Usage: var liff = LiffClient.CreateWithStaticToken("CHANNEL_ACCESS_TOKEN"); var apps = await liff.GetAppsAsync(); var added = await liff.AddAppAsync(new AddLiffAppRequest { /* ... / }); await liff.UpdateAppAsync(added!.LiffId!, new UpdateLiffAppRequest { / ... */ }); await liff.DeleteAppAsync(added.LiffId!);
public sealed class LiffClient
- Inheritance
-
LiffClient
- Inherited Members
Constructors
LiffClient(IAuthenticationProvider, HttpClient?)
public LiffClient(IAuthenticationProvider authProvider, HttpClient? httpClient = null)
Parameters
authProviderIAuthenticationProviderAuthentication provider (static or refreshing, either works).
httpClientHttpClientThe HttpClient shared by the adapter. Supplied by
IHttpClientFactoryvia DI (shared handler pool, Kiota default middleware applied). When null, the adapter creates its own default HttpClient (for quick use).
Properties
Api
The generated client (exposed for low-level operations).
public LiffApiClient Api { get; }
Property Value
- LiffApiClient
Methods
CreateWithStaticToken(string)
Helper to quickly construct from a long-lived channel access token.
public static LiffClient CreateWithStaticToken(string channelAccessToken)
Parameters
channelAccessTokenstring
Returns
DeleteAppAsync(string, CancellationToken)
Deletes a LIFF app from the channel (DELETE /liff/v1/apps/{liffId}).
public Task DeleteAppAsync(string liffId, CancellationToken cancellationToken = default)
Parameters
liffIdstringcancellationTokenCancellationToken
Returns
GetAppsAsync(CancellationToken)
Gets all LIFF apps registered on the channel (GET /liff/v1/apps).
public Task<GetAllLiffAppsResponse?> GetAppsAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationToken
Returns
- Task<GetAllLiffAppsResponse>