Trying LINE Login on a web app

The LINE Login starter application is a sample web app, written in Java, which shows you how you can use LINE Login in a web app. Here, we'll show you how to deploy the app on Heroku, check logs, and modify the app for yourself.

If you'd like to integrate LINE Login with your existing app, go to Integrate LINE Login.

Before you begin

Make sure you have the following:

Deploy the app

  1. Go to the line-login-starter repository on GitHub
  2. Select the Deploy to Heroku button in the README file
  3. Fill in the required information on the "Create New App" page in Heroku
    • Heroku app name (optional)
    • Region
    • Config variables
      • Channel ID (found in the console)
      • Channel secret (found in the console)
      • Callback URL in the following format: https:// + {Heroku app name} +
  4. Select Deploy app and confirm that your app is successfully deployed

Configure your app

Set the callback URL on the LINE Login tab of your LINE Login channel settings on the console

Try it out

When you successfully log in with your LINE credentials, the app displays your LINE user profile image, display name, and status message. Note that you will be logged in automatically if you are logged in to LINE on your iOS or Android device.

  1. Go to the URL of your app to open up the LINE Login dialog. https:// + {Heroku app name} +
  2. Log in to LINE and agree to grant the required permissions to the app

Try out the other features of the starter app

Once you have logged into the app, you can select the following buttons to try out other features of this app.

  • Verify the user access token
  • Refresh the user access token
  • Log out the user (revoke the access token)

Check logs

To get more information, you can check the logs of your app using Heroku CLI.

  1. Log in to Heroku from the command line

    $ heroku login
  2. Check the logs

    $ heroku logs --app {Heroku app name} --tail

Download and make changes to the starter app

You can download the starter app to your local machine to test and make changes for yourself. You can then deploy the app to a web server of your choice. Here, we'll look at how to make and deploy changes to the Heroku app you created in the previous step.

  1. Make sure you have the following installed

    • JDK 1.8 or higher installed
    • Maven™ 3.0 or higher installed
    • Git™
  2. Clone the line-login-starter GitHub repository.

    git clone
  3. cd into your Git directory

  4. Add a remote for Heroku to your local repository

    $ heroku git:remote -a {Heroku app name}
  5. Make edits and commit changes (optional)

    $ git add .
    $ git commit -m "First commit"
  6. Push changes to Heroku master

    $ git push heroku master

Next steps

You have now seen how you can use LINE Login in a sample web application. To learn more about how to integrate LINE Login with your existing web app, go to Integrating LINE Login with your web app.

{{ $t("form.question.helpful") }}

{{ $t("form.question.detail") }}

{{ $t("form.question.improve") }}

{{ $t("") }}{{ $t("") }}{{ $t("") }}

{{ $t("form.result.success") }}
{{ $t("form.result.error") }}
{{ $t("form.result.errorLink") }}