PHPackages                             chez14/line-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. chez14/line-sdk

AbandonedArchivedLibrary[Authentication &amp; Authorization](/categories/authentication)

chez14/line-sdk
===============

Line SDK Client for PHP. Used for simple Login API or Social API.

1651PHP

Since May 22Pushed 6y ago1 watchersCompare

[ Source](https://github.com/chez14/line-sdk-php)[ Packagist](https://packagist.org/packages/chez14/line-sdk)[ RSS](/packages/chez14-line-sdk/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (2)Used By (0)

line-sdk-php
============

[](#line-sdk-php)

[![PHP from Packagist](https://camo.githubusercontent.com/b4e9b651d21762e5602c6d178b303f5f1a5f292a9949f73628587c9f366f38f2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6368657a31342f6c696e652d73646b2e7376673f7374796c653d666c61742d737175617265)](https://github.com/chez14/line-sdk-php)[![Travis (.org)](https://camo.githubusercontent.com/e2e16e684cc7a05a19cf682549b0d96a3333a802e989952ed9cf1c1559c6ff44/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6368657a31342f6c696e652d73646b2d7068702e7376673f7374796c653d666c61742d737175617265)](https://github.com/chez14/line-sdk-php) [![Packagist](https://camo.githubusercontent.com/51738176a669441d97ffa35ef6ccd417908f7c25bf113b3c2e52c07e851ef0ac/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6368657a31342f6c696e652d73646b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/chez14/line-sdk) [![GitHub release](https://camo.githubusercontent.com/a80a6d964ecebb96856b22c7ba6cea53012abbf28c6589258259fc3fb20ad9d8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6368657a31342f6c696e652d73646b2d7068702e7376673f7374796c653d666c61742d737175617265)](https://github.com/chez14/line-sdk-php)

Line SDK Client for PHP. Used for simple Login API or Social API.

**STILL UNSTABLE, I'M STILL TESTING THESE APIs**. Do at your own risk.

About the LINE API
==================

[](#about-the-line-api)

See the official API documentation for more information.

English: [developers.line.me/en/docs](https://developers.line.me/en/docs)

Japanese: [developers.line.me/ja/docs](https://developers.line.me/ja/docs)

Getting Started
===============

[](#getting-started)

Installation
------------

[](#installation)

Use [Composer](https://getcomposer.org) to pull this library.

```
$ composer require chez14/line-sdk
```

Create a Channel
----------------

[](#create-a-channel)

1. Create a LINE Channel, follow [this step](https://developers.line.biz/en/docs/line-login/getting-started/) to get started. Or simply use the one you have.
2. Go to [LINE Developer Console](https://developers.line.biz/console/), grab the Channel Secret and Channel ID.

Creating API Instance
---------------------

[](#creating-api-instance)

Create a new object from `LINE\Api`. Don't forget to supply both `client_id` and `client_secret` to the parameter.

```
$api = new LINE\Api([
    "channel_secret" => '00112233445566778899aabbccddeeff',
    "channel_id" => '0123456789'
]);
```

After that, you can use your get your auth code, and do some OAuth job.

```
$login = new LINE\Login($api);

echo $login->get_authorization_url("http://localhost/callback.php", [
    LINE\Login::SCOPE_OPENID,
    LINE\Login::SCOPE_PROFILE
]) . PHP_EOL;

// will produce:
// https://access.line.me/oauth2/v2.1/authorize?response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fakun%2Foauth%2Fline&client_id=0123456789&scope=openid+profile&state=1OaoBjV9US69fzOx&prompt=consent

// OR
echo $login->get_authorization_url("http://localhost/callback.php", [
    "openid","profile"
]) . PHP_EOL;

// -------------- on the callback.php:
$token = $login->parse_from_request();

$api->setToken($token);

$social = new LINE\Social($api);
var_dump($social->getProfile()); //echo the profiles
```

Check our documentation page to get more info about this library classes, and see our [`examples` folder](examples/) to get more examples.

Go beyond, and plus ultra!
--------------------------

[](#go-beyond-and-plus-ultra)

Check this API Documentation (tbd), and check LINE's corresponding documentations.

Have fun!

[![All Might - Thumbs Up](https://camo.githubusercontent.com/699501959fe6cd5129ec38d41f77039296136b39e1c642de994a7d9fd2b3f05c/68747470733a2f2f7468756d62732e6766796361742e636f6d2f4772616e6453637261746368794369636164612d736d616c6c2e676966)](https://camo.githubusercontent.com/699501959fe6cd5129ec38d41f77039296136b39e1c642de994a7d9fd2b3f05c/68747470733a2f2f7468756d62732e6766796361742e636f6d2f4772616e6453637261746368794369636164612d736d616c6c2e676966)

License
=======

[](#license)

[MIT](LICENSE).

Bug Report
==========

[](#bug-report)

Please, if you have any feedback or bug report for this lib, submit it to the issue tracker. If you concern about the security and privacy, you can PGP-encrypt it using [Chez14's Keybase](https://keybase.io/encrypt#chez14), and submit it as an issue.

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5555026?v=4)[Chris Qiang](/maintainers/chez14)[@chez14](https://github.com/chez14)

---

Top Contributors

[![chez14](https://avatars.githubusercontent.com/u/5555026?v=4)](https://github.com/chez14 "chez14 (29 commits)")

---

Tags

lineline-apiphp

### Embed Badge

![Health badge](/badges/chez14-line-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/chez14-line-sdk/health.svg)](https://phpackages.com/packages/chez14-line-sdk)
```

###  Alternatives

[kartik-v/yii2-password

Useful password strength validation utilities for Yii Framework 2.0

761.2M17](/packages/kartik-v-yii2-password)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
