1. Documents
  2. Web API

Try LINE Login on your web application

The LINE Login starter application is written in Java and lets you quickly see how LINE Login works on a sample web application. This guide explains how to integrate LINE Login on a web server using Heroku. If you’d like to integrate LINE Login with your existing app, go to Integrating LINE Login with your web application.

Before you begin

Make sure you have the following:

Get the application

Clone the line-login-starter GitHub repository

$ git clone https://github.com/line/line-login-starter.git

Deploy the app

  1. Select the Deploy to Heroku button in the README file.
  2. Fill in the required information on the “Create a New App” page in Heroku
    • App name (optional)
    • Runtime selection
    • Channel ID
    • Channel secret
    • Callback URL in the following format: https:// + {Heroku app name} + .herokuapp.com/auth
  3. Select Deploy and confirm that your app is successfully deployed

Configure your app

Set the callback URL in the Technical configuration page of the Channel 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 the LINE app 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} + .herokuapp.com
  2. Log in to LINE and agree to grant the required permissions to the app.

Try out the features of the starter application

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. Clone the source code of the app from Heroku using Git

    $ heroku git:clone -a demo-login-starter-app
  3. Check the logs

    $ heroku logs --tail

Next steps

You have now seen how you can use LINE Login in a 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.