lineapi 0.6.4

LINE API library.
Documentation

lineapi-rs

LINE API library supporting both LINE Messaging API and LINE Login API.

Documentation

Changes

CHANGELOG.md

Supported APIs

LINE Messaging API

LINE Login API (v0.6.0+)

Features

  • Retry mechanism with exponential backoff
  • Configurable timeout duration
  • Configurable retry duration
  • Mock support for testing
  • Stream support for large data
  • PKCE (Proof Key for Code Exchange) support for OAuth

Examples

OAuth Web Application (examples/oauth/)

A complete web application demonstrating LINE Login integration with PKCE (Proof Key for Code Exchange).

Features:

  • OAuth authorization URL generation with PKCE
  • State parameter validation for security
  • Authorization code exchange for access token
  • User profile retrieval using access token
  • Secure cookie-based session management

Usage:

cd examples/oauth
LINE_CLIENT_ID=your_client_id \
LINE_CLIENT_SECRET=your_client_secret \
LINE_REDIRECT_URI=http://localhost:5173/oauth-line \
cargo run

Flow:

  1. Visit http://localhost:5173/ to start OAuth flow
  2. Click the OAuth link to authorize with LINE
  3. Get redirected back with user profile information

Dependencies:

  • axum - Web framework
  • tower-cookies - Cookie management
  • uuid - Generate secure PKCE verifier and state