{"id":15036627,"url":"https://github.com/line/line-bot-sdk-python","last_synced_at":"2026-04-07T13:01:14.144Z","repository":{"id":11965077,"uuid":"70553423","full_name":"line/line-bot-sdk-python","owner":"line","description":"LINE Messaging API SDK for Python","archived":false,"fork":false,"pushed_at":"2026-03-31T14:12:17.000Z","size":31396,"stargazers_count":2087,"open_issues_count":7,"forks_count":1047,"subscribers_count":105,"default_branch":"master","last_synced_at":"2026-03-31T16:16:12.326Z","etag":null,"topics":["bot","line","linebot","python","sdk"],"latest_commit_sha":null,"homepage":"https://pypi.python.org/pypi/line-bot-sdk","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/line.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2016-10-11T03:42:26.000Z","updated_at":"2026-03-31T14:12:19.000Z","dependencies_parsed_at":"2023-01-14T12:14:52.177Z","dependency_job_id":"5b18be14-f9c8-49d0-b18d-759745303ad7","html_url":"https://github.com/line/line-bot-sdk-python","commit_stats":{"total_commits":482,"total_committers":58,"mean_commits":8.310344827586206,"dds":0.6867219917012448,"last_synced_commit":"712ec29616ef52115d0341e6917e04f5bb15b0f4"},"previous_names":[],"tags_count":76,"template":false,"template_full_name":null,"purl":"pkg:github/line/line-bot-sdk-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/line%2Fline-bot-sdk-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/line%2Fline-bot-sdk-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/line%2Fline-bot-sdk-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/line%2Fline-bot-sdk-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/line","download_url":"https://codeload.github.com/line/line-bot-sdk-python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/line%2Fline-bot-sdk-python/sbom","scorecard":{"id":590599,"data":{"date":"2025-08-11","repo":{"name":"github.com/line/line-bot-sdk-python","commit":"3b30b636accab542af377eca50e40dfacf7342eb"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.9,"checks":[{"name":"Code-Review","score":10,"reason":"all changesets reviewed","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":10,"reason":"26 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":6,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'contents' permission set to 'read': .github/workflows/auto-testing.yml:51","Info: jobLevel 'contents' permission set to 'read': .github/workflows/auto-testing.yml:78","Info: jobLevel 'contents' permission set to 'read': .github/workflows/auto-testing.yml:16","Info: jobLevel 'contents' permission set to 'read': .github/workflows/check-eol-newrelease.yml:13","Warn: jobLevel 'contents' permission set to 'write': .github/workflows/create-draft-release.yml:46","Info: found token with 'none' permissions: .github/workflows/create-draft-release.yml:1","Warn: jobLevel 'contents' permission set to 'write': .github/workflows/generate-code.yml:15","Warn: no topLevel permission defined: .github/workflows/auto-testing.yml:1","Warn: no topLevel permission defined: .github/workflows/check-eol-newrelease.yml:1","Warn: no topLevel permission defined: .github/workflows/close-issue.yml:1","Warn: no topLevel permission defined: .github/workflows/create-draft-release.yml:1","Warn: no topLevel permission defined: .github/workflows/generate-code.yml:1","Warn: no topLevel permission defined: .github/workflows/label-issue.yml:1","Warn: no topLevel permission defined: .github/workflows/publish-to-pypi.yml:1"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: tools/openapi-generator-cli.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/publish-to-pypi.yml:72"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":4,"reason":"dependency not pinned by hash detected -- score normalized to 4","details":["Warn: pipCommand not pinned by hash: .github/workflows/auto-testing.yml:35","Warn: pipCommand not pinned by hash: .github/workflows/auto-testing.yml:36","Warn: pipCommand not pinned by hash: .github/workflows/auto-testing.yml:45","Warn: pipCommand not pinned by hash: .github/workflows/auto-testing.yml:70","Warn: pipCommand not pinned by hash: .github/workflows/auto-testing.yml:71","Warn: pipCommand not pinned by hash: .github/workflows/publish-to-pypi.yml:30","Warn: pipCommand not pinned by hash: .github/workflows/publish-to-pypi.yml:31","Info:  21 out of  21 GitHub-owned GitHubAction dependencies pinned","Info:   2 out of   2 third-party GitHubAction dependencies pinned","Info:   0 out of   7 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"49 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2023-120 / GHSA-45c4-8wx5-qw6w","Warn: Project is vulnerable to: GHSA-5m98-qgg9-wh84","Warn: Project is vulnerable to: GHSA-7gpw-8wmc-pm8g","Warn: Project is vulnerable to: GHSA-8495-4g3g-x7pr","Warn: Project is vulnerable to: PYSEC-2024-26 / GHSA-8qpw-xqxj-h4r2","Warn: Project is vulnerable to: GHSA-9548-qrrj-x5pj","Warn: Project is vulnerable to: PYSEC-2023-246 / GHSA-gfw2-4jvh-wgfg","Warn: Project is vulnerable to: GHSA-pjjw-qhg8-p2p9","Warn: Project is vulnerable to: PYSEC-2023-250 / GHSA-q3qx-c6g2-7pw2","Warn: Project is vulnerable to: PYSEC-2023-251 / GHSA-qvrw-v9rv-5rjx","Warn: Project is vulnerable to: PYSEC-2021-76 / GHSA-v6wp-4m6f-gcjg","Warn: Project is vulnerable to: PYSEC-2023-247 / GHSA-xx9p-xxvh-7g8j","Warn: Project is vulnerable to: PYSEC-2021-100 / GHSA-8h2j-cgx8-6xv7","Warn: Project is vulnerable to: PYSEC-2024-38","Warn: Project is vulnerable to: PYSEC-2020-150 / GHSA-33c7-2mpw-hg34","Warn: Project is vulnerable to: PYSEC-2020-151 / GHSA-f97h-2pfx-f59f","Warn: Project is vulnerable to: PYSEC-2018-66 / GHSA-562c-5r94-xh97","Warn: Project is vulnerable to: PYSEC-2019-179 / GHSA-5wv5-4vpf-pj6m","Warn: Project is vulnerable to: PYSEC-2023-62 / GHSA-m2qf-hxjv-5gpq","Warn: Project is vulnerable to: GHSA-2g68-c3qc-8985","Warn: Project is vulnerable to: GHSA-f9vj-2wh5-fj8j","Warn: Project is vulnerable to: PYSEC-2023-221 / GHSA-hrfv-mqp8-q5rw","Warn: Project is vulnerable to: GHSA-j544-7q9p-6xp8","Warn: Project is vulnerable to: PYSEC-2023-57 / GHSA-px8h-6qxv-m22q","Warn: Project is vulnerable to: GHSA-q34m-jh98-gwm2","Warn: Project is vulnerable to: PYSEC-2023-58 / GHSA-xg9f-g7g7-2323","Warn: Project is vulnerable to: PYSEC-2022-203","Warn: Project is vulnerable to: GHSA-j288-q9x7-2f5v","Warn: Project is vulnerable to: GHSA-xqrq-4mgf-ff32","Warn: Project is vulnerable to: PYSEC-2021-47 / GHSA-5jqp-qgf6-3pvh","Warn: Project is vulnerable to: GHSA-mr82-8j83-vxmv","Warn: Project is vulnerable to: PYSEC-2014-14 / GHSA-652x-xj99-gmcc","Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: PYSEC-2014-13 / GHSA-cfj3-7x9c-4p3h","Warn: Project is vulnerable to: PYSEC-2018-28 / GHSA-x84v-xcm2-53pg","Warn: Project is vulnerable to: PYSEC-2015-17","Warn: Project is vulnerable to: PYSEC-2023-74","Warn: Project is vulnerable to: GHSA-34jh-p97f-mpxf","Warn: Project is vulnerable to: PYSEC-2023-212 / GHSA-g4mx-q9vg-27p4","Warn: Project is vulnerable to: PYSEC-2023-207 / GHSA-gwvm-45gx-3cf8","Warn: Project is vulnerable to: PYSEC-2019-133 / GHSA-mh33-7rrq-662w","Warn: Project is vulnerable to: GHSA-pq67-6m6q-mj2v","Warn: Project is vulnerable to: PYSEC-2019-132 / GHSA-r64q-w8jr-g9qp","Warn: Project is vulnerable to: PYSEC-2023-192 / GHSA-v845-jxx5-vc9f","Warn: Project is vulnerable to: PYSEC-2020-148 / GHSA-wqvq-5m8c-6g24","Warn: Project is vulnerable to: PYSEC-2018-32 / GHSA-www2-v7xj-xrc6","Warn: Project is vulnerable to: PYSEC-2021-108","Warn: Project is vulnerable to: PYSEC-2021-59"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T21:47:25.036Z","repository_id":11965077,"created_at":"2025-08-20T21:47:25.036Z","updated_at":"2025-08-20T21:47:25.036Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31402277,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["bot","line","linebot","python","sdk"],"created_at":"2024-09-24T20:31:45.045Z","updated_at":"2026-04-07T13:01:14.124Z","avatar_url":"https://github.com/line.png","language":"Python","readme":"LINE Messaging API SDK for Python\n=================================\n\n|PyPI version|\n\nSDK of the LINE Messaging API for Python.\n\nIntroduction\n------------\nThe LINE Messaging API SDK for Python makes it easy to develop bots using LINE Messaging API, and you can create a sample bot within minutes.\n\n\nDocumentation\n-------------\n\nSee the official API documentation for more information\n\nEnglish: https://developers.line.biz/en/docs/messaging-api/overview/\n\nJapanese: https://developers.line.biz/ja/docs/messaging-api/overview/\n\nRequirements\n------------\n\n-  Python \u003e= 3.10\n\nInstallation\n------------\n\n::\n\n    $ pip install line-bot-sdk\n\nSynopsis\n--------\n\nUsage:\n\n.. code:: python\n\n    from flask import Flask, request, abort\n\n    from linebot.v3 import (\n        WebhookHandler\n    )\n    from linebot.v3.exceptions import (\n        InvalidSignatureError\n    )\n    from linebot.v3.messaging import (\n        Configuration,\n        ApiClient,\n        MessagingApi,\n        ReplyMessageRequest,\n        TextMessage\n    )\n    from linebot.v3.webhooks import (\n        MessageEvent,\n        TextMessageContent\n    )\n\n    app = Flask(__name__)\n\n    configuration = Configuration(access_token='YOUR_CHANNEL_ACCESS_TOKEN')\n    handler = WebhookHandler('YOUR_CHANNEL_SECRET')\n\n\n    @app.route(\"/callback\", methods=['POST'])\n    def callback():\n        # get X-Line-Signature header value\n        signature = request.headers['X-Line-Signature']\n\n        # get request body as text\n        body = request.get_data(as_text=True)\n        app.logger.info(\"Request body: \" + body)\n\n        # handle webhook body\n        try:\n            handler.handle(body, signature)\n        except InvalidSignatureError:\n            app.logger.info(\"Invalid signature. Please check your channel access token/channel secret.\")\n            abort(400)\n\n        return 'OK'\n\n\n    @handler.add(MessageEvent, message=TextMessageContent)\n    def handle_message(event):\n        with ApiClient(configuration) as api_client:\n            line_bot_api = MessagingApi(api_client)\n            line_bot_api.reply_message_with_http_info(\n                ReplyMessageRequest(\n                    reply_token=event.reply_token,\n                    messages=[TextMessage(text=event.message.text)]\n                )\n            )\n\n    if __name__ == \"__main__\":\n        app.run()\n\nAPI\n---\n\nSee `linebot/v3/messaging/docs \u003clinebot/v3/messaging/docs/MessagingApi.md\u003e`__ . Other docs are in ``linebot/v3/\u003cfeature\u003e/docs/*.md``.\n\n\nWebhook\n-------\n\nWebhookParser\n~~~~~~~~~~~~~\n\n※ You can use WebhookParser\n\n\\_\\_init\\_\\_(self, channel\\_secret, skip\\_signature\\_verification=lambda: False)\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. code:: python\n\n    parser = linebot.v3.WebhookParser('YOUR_CHANNEL_SECRET')\n\n    # or with skip_signature_verification option\n    parser = linebot.v3.WebhookParser(\n        'YOUR_CHANNEL_SECRET',\n        skip_signature_verification=lambda: False\n\nparse(self, body, signature, as_payload=False)\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nParses the webhook body, and returns a list of Event objects or a WebhookPayload object (depending on as_payload).\nIf the signature does NOT match, ``InvalidSignatureError`` is raised.\n\n.. code:: python\n\n    events = parser.parse(body, signature)\n\n    for event in events:\n        do_something(event)\n\n.. code:: python\n\n    payload = parser.parse(body, signature, as_payload=True)\n\n    for event in payload.events:\n        do_something(payload.event, payload.destination)\n\nWebhookHandler\n~~~~~~~~~~~~~~\n\n※ You can use WebhookHandler\n\n\\_\\_init\\_\\_(self, channel\\_secret, skip\\_signature\\_verification=lambda: False)\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. code:: python\n\n    handler = linebot.v3.WebhookHandler('YOUR_CHANNEL_SECRET')\n\n    # or with skip_signature_verification option\n    handler = linebot.v3.WebhookHandler(\n        'YOUR_CHANNEL_SECRET',\n        skip_signature_verification=lambda: False\n\nhandle(self, body, signature)\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nHandles webhooks with **handlers** added\nby the decorators `add \u003c#add-self-event-message-none\u003e`__ and `default \u003c#default-self\u003e`__.\nIf the signature does NOT match, ``InvalidSignatureError`` is raised.\n\n.. code:: python\n\n    handler.handle(body, signature)\n\nadd(self, event, message=None)\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nAdd a **handler** method by using this decorator.\n\n.. code:: python\n\n    @handler.add(MessageEvent, message=TextMessage)\n    def handle_message(event):\n        line_bot_api.reply_message(\n            ReplyMessageRequest(\n                reply_token=event.reply_token,\n                messages=[TextMessage(text=event.message.text)]\n            )\n        )\n\nWhen the event is an instance of MessageEvent and event.message is an instance of TextMessage,\nthis handler method is called.\n\n.. code:: python\n\n    @handler.add(MessageEvent)\n    def handle_message(event, destination):\n        # do something\n\nIf the arity of the handler method is more than one,\na destination property in a webhook request is passed to it as the second argument.\n\n.. code:: python\n\n    @handler.add(FollowEvent)\n    def handle_follow():\n        # do something\n\nIf the arity of the handler method is zero, the handler method is called with no arguments.\n\ndefault(self)\n^^^^^^^^^^^^^\n\nSet the default **handler** method by using this decorator.\n\n.. code:: python\n\n    @handler.default()\n    def default(event):\n        print(event)\n\nIf there is no handler for an event, this default handler method is called.\n\nWebhookPayload\n~~~~~~~~~~~~~~~\n\nhttps://developers.line.biz/en/reference/messaging-api/#request-body\n\n- WebhookPayload\n    - destination\n    - events: list[`Event`]\n\nWebhook event object\n~~~~~~~~~~~~~~~~~~~~\n\nhttps://developers.line.biz/en/reference/messaging-api/#webhook-event-objects\n\n\nHints\n-----\n\nExamples\n~~~~~~~~\n\n`aiohttp-echo \u003cexamples/aiohttp-echo\u003e`__\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nSample echo-bot with asynchronous processings.\n\n`fastapi-echo \u003cexamples/fastapi-echo\u003e`__\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nSample echo-bot using `FastAPI \u003chttps://fastapi.tiangolo.com/\u003e`__\n\n\n`flask-echo \u003cexamples/flask-echo\u003e`__\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nSample echo-bot using `Flask \u003chttp://flask.pocoo.org/\u003e`__\n\n`flask-kitchensink \u003cexamples/flask-kitchensink\u003e`__\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nSample bot using `Flask \u003chttp://flask.pocoo.org/\u003e`__\n\n\n`rich-menu \u003cexamples/rich-menu\u003e`__\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nSwitching richmenu script\n\n`simple-server-echo \u003cexamples/simple-server-echo\u003e`__\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nSample echo-bot using\n`wsgiref.simple\\_server \u003chttps://docs.python.org/3/library/wsgiref.html\u003e`__\n\n\nHow to deserializes JSON to FlexMessage or RichMenu\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nline-bot-python-sdk provides ``from_json`` method for each model.\nIt deserializes the JSON into the specified model.\nThus, you can send a JSON designed with `Flex Message Simulator \u003chttps://developers.line.biz/console/fx/\u003e`__.\n\n.. code:: python\n\n    bubble_string = \"\"\"{ type:\"bubble\", ... }\"\"\"\n    message = FlexMessage(alt_text=\"hello\", contents=FlexContainer.from_json(bubble_string))\n    line_bot_api.reply_message(\n        ReplyMessageRequest(\n            reply_token=event.reply_token,\n            messages=[message]\n        )\n    )\n\nHow to get x-line-request-id header and error message\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nYou may need to store the ``x-line-request-id`` header obtained as a response from several APIs.\nIn this case, please use ``~_with_http_info`` functions. You can get headers and status codes.\nThe ``x-line-accepted-request-id`` or ``content-type`` header can also be obtained in the same way.\n\n.. code:: python\n\n    response = line_bot_api.reply_message_with_http_info(\n        ReplyMessageRequest(\n            reply_token=event.reply_token,\n            messages=[TextMessage(text='see application log')]\n        )\n    )\n    app.logger.info(\"Got response with http status code: \" + str(response.status_code))\n    app.logger.info(\"Got x-line-request-id: \" + response.headers['x-line-request-id'])\n    app.logger.info(\"Got response with http body: \" + str(response.data))\n\nYou can get error messages from ``ApiException`` when you use ``MessagingApi``. Each client defines its own exception class.\n\n.. code:: python\n\n    from linebot.v3.messaging import ApiException, ErrorResponse\n    try:\n        line_bot_api.reply_message_with_http_info(\n            ReplyMessageRequest(\n                reply_token='invalid-reply-token',\n                messages=[TextMessage(text='see application log')]\n            )\n        )\n    except ApiException as e:\n        app.logger.info(\"Got response with http status code: \" + str(e.status))\n        app.logger.info(\"Got x-line-request-id: \" + e.headers['x-line-request-id'])\n        app.logger.info(\"Got response with http body: \" + str(ErrorResponse.from_json(e.body)))\n\nWhen you need to get ``x-line-accepted-request-id`` header from error response, you can get it: ``e.headers['x-line-accepted-request-id']``.\n\n\nHelp and media\n--------------\nFAQ: https://developers.line.biz/en/faq/\n\nNews: https://developers.line.biz/en/news/\n\nVersioning\n----------\nThis project respects semantic versioning\n\n- See `semver.org \u003chttps://semver.org/\u003e`_\n\nHowever, if a feature that was publicly released is discontinued for business reasons and becomes completely unusable, we will release changes as a patch release.\n\nVersion 3.x\n-----------\nLINE's SDK developer team decided to generate SDK code based on OpenAPI spec. https://github.com/line/line-openapi\n\nAs a result, LINE bot sdk 3.x is not compatible with 2.x. It can follow the future API changes very quickly.\n\nWe will be maintaining only ``linebot.v3`` going forward.\nTo utilize the latest features, we recommend you gradually transition to ``linebot.v3`` modules in your application, although you can still continue to use the 2.x ``linebot`` modules.\n\nWhile we won't update ``linebot`` modules anymore, users can still continue to use the version 2.x ``linebot`` modules.\nWe also welcome pull requests for the version ``2.x`` and ``3.x`` modules.\n\n\nHow to suppress deprecation warnings\n------------------------------------\nIf you keep using old line-bot-sdk library (``version \u003c 3.x``) but use ``3.x``, you'll get\n\n::\n\n  LineBotSdkDeprecatedIn30: Call to deprecated method get_bot_info. (Use 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).get_bot_info(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.) -- Deprecated since version 3.0.0.\n\n\nIf it's noisy, you can suppress this warning as follows.\n\n\n.. code:: python\n\n    import warnings\n    from linebot import LineBotSdkDeprecatedIn30\n\n    ## your code here\n    ...\n\n    if __name__ == '__main__':\n        warnings.filterwarnings(\"ignore\", category=LineBotSdkDeprecatedIn30)\n\n\nContributing\n------------\nPlease check `CONTRIBUTING \u003cCONTRIBUTING.md\u003e`__ before making a contribution.\n\n.. |PyPI version| image:: https://badge.fury.io/py/line-bot-sdk.svg\n   :target: https://badge.fury.io/py/line-bot-sdk\n\nLicense\n--------\n\n::\n\n    Copyright (C) 2016 LINE Corp.\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fline%2Fline-bot-sdk-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fline%2Fline-bot-sdk-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fline%2Fline-bot-sdk-python/lists"}