{"id":19973823,"url":"https://github.com/chez14/line-sdk-php","last_synced_at":"2026-06-08T08:33:27.040Z","repository":{"id":62501628,"uuid":"179971539","full_name":"chez14/line-sdk-php","owner":"chez14","description":"Line SDK Client for PHP. Used for simple Login API or Social API.","archived":false,"fork":false,"pushed_at":"2019-10-15T02:01:22.000Z","size":57,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-01T18:51:51.350Z","etag":null,"topics":["line","line-api","php"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chez14.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-07T13:39:50.000Z","updated_at":"2019-05-22T13:00:48.000Z","dependencies_parsed_at":"2022-11-02T12:01:47.057Z","dependency_job_id":null,"html_url":"https://github.com/chez14/line-sdk-php","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chez14/line-sdk-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chez14%2Fline-sdk-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chez14%2Fline-sdk-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chez14%2Fline-sdk-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chez14%2Fline-sdk-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chez14","download_url":"https://codeload.github.com/chez14/line-sdk-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chez14%2Fline-sdk-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34055249,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["line","line-api","php"],"created_at":"2024-11-13T03:13:04.683Z","updated_at":"2026-06-08T08:33:26.996Z","avatar_url":"https://github.com/chez14.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# line-sdk-php\n[![PHP from Packagist](https://img.shields.io/packagist/php-v/chez14/line-sdk.svg?style=flat-square)](https://github.com/chez14/line-sdk-php)\n [![Travis (.org)](https://img.shields.io/travis/chez14/line-sdk-php.svg?style=flat-square)](https://github.com/chez14/line-sdk-php) [![Packagist](https://img.shields.io/packagist/v/chez14/line-sdk.svg?style=flat-square)](https://packagist.org/packages/chez14/line-sdk) [![GitHub release](https://img.shields.io/github/release/chez14/line-sdk-php.svg?style=flat-square)](https://github.com/chez14/line-sdk-php)\n \nLine SDK Client for PHP. Used for simple Login API or Social API.\n\n**STILL UNSTABLE, I'M STILL TESTING THESE APIs**. Do at your own risk.\n\n# About the LINE API\nSee the official API documentation for more information.\n\nEnglish: [developers.line.me/en/docs](https://developers.line.me/en/docs)\n\nJapanese: [developers.line.me/ja/docs](https://developers.line.me/ja/docs)\n\n# Getting Started\n## Installation\nUse [Composer](https://getcomposer.org) to pull this library.\n```shell\n$ composer require chez14/line-sdk\n```\n\n## Create a Channel \n1. 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.\n2. Go to [LINE Developer Console](https://developers.line.biz/console/), grab the Channel Secret and Channel ID.\n\n## Creating API Instance\n\nCreate a new object from `LINE\\Api`. Don't forget to supply both `client_id` and `client_secret` to the parameter.\n\n```php\n$api = new LINE\\Api([\n    \"channel_secret\" =\u003e '00112233445566778899aabbccddeeff',\n    \"channel_id\" =\u003e '0123456789'\n]);\n```\n\nAfter that, you can use your get your auth code, and do some OAuth job.\n```php\n$login = new LINE\\Login($api);\n\necho $login-\u003eget_authorization_url(\"http://localhost/callback.php\", [\n    LINE\\Login::SCOPE_OPENID,\n    LINE\\Login::SCOPE_PROFILE\n]) . PHP_EOL;\n\n// will produce:\n// https://access.line.me/oauth2/v2.1/authorize?response_type=code\u0026redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fakun%2Foauth%2Fline\u0026client_id=0123456789\u0026scope=openid+profile\u0026state=1OaoBjV9US69fzOx\u0026prompt=consent\n\n// OR\necho $login-\u003eget_authorization_url(\"http://localhost/callback.php\", [\n    \"openid\",\"profile\"\n]) . PHP_EOL;\n\n\n// -------------- on the callback.php:\n$token = $login-\u003eparse_from_request();\n\n$api-\u003esetToken($token);\n\n$social = new LINE\\Social($api);\nvar_dump($social-\u003egetProfile()); //echo the profiles\n```\n\nCheck our documentation page to get more info about this library classes, and\nsee our [`examples` folder](examples/) to get more examples.\n\n## Go beyond, and plus ultra!\nCheck this API Documentation (tbd), and check LINE's corresponding documentations.\n\nHave fun!\n\n![All Might - Thumbs Up](https://thumbs.gfycat.com/GrandScratchyCicada-small.gif)\n\n# License\n[MIT](LICENSE).\n\n# Bug Report\nPlease, if you have any feedback or bug report for this lib, submit it to\nthe issue tracker. If you concern about the security and privacy, you can\nPGP-encrypt it using [Chez14's Keybase](https://keybase.io/encrypt#chez14),\nand submit it as an issue.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchez14%2Fline-sdk-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchez14%2Fline-sdk-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchez14%2Fline-sdk-php/lists"}