Skip to content

LINE Login Auth

Description

使用 LINE Login 回傳的 Code 進行驗證,並取得 Access Token。

Resource

POST /v1/user/line/auth

Authorization

採用 OAuth 2.0 Bearer Token,詳細使用流程請參考 Auth Login

Request Body Parameters

Name Type Description Required
code string LINE Login 回傳的授權碼 Yes
redirect_uri string 回調網址 (需與取得連結時一致) Yes
store_id string 門市代號 (選填,若無則取站台設定) No

Response

{
  "access_token": "eyJhbGciOiJIUz...",
  "token_type": "Bearer",
  "refresh_token": "...",
  "expires_in": 2592000,
  "scope": "profile openid",
  "id_token": "..."
}

Response Body Parameters

Name Type Description
access_token string 存取權杖,用於存取 LINE API
token_type string 權杖類型 (通常為 Bearer)
refresh_token string 刷新權杖,用於取得新的 access_token
expires_in integer access_token 的有效時間 (秒)
scope string 授權範圍
id_token string 包含使用者資訊的 ID Token (JWT 格式,僅在 scope 包含 openid 時回傳)