Trying the sample LIFF app

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

Before you begin

Make sure you have completed the following:

Deploying the starter app

  1. Go to the line-liff-starter repository on GitHub.
  2. Select the Deploy to Heroku button in the README file.
  3. Fill in the required information on the "Create a New App" page in Heroku.
  4. Select Deploy app and confirm that your app is successfully deployed.
  5. Record the app URL (https://{Heroku app name} You will set this URL when you add the app to LIFF.

Adding the starter app to LIFF

Add the app to LIFF. For more information, see Adding a LIFF app.

Trying it out

To open the LIFF app within LINE, follow the steps below.

  1. Tap line://app/{liffId} on the chat screen of LINE. {liffId} is the LIFF app ID returned to the API request to add the app to LIFF.
  2. Agree to grant the required permissions to the LIFF app.
  3. When opening the LIFF app, the following four buttons and the content of received information are displayed.
    • Open Window: Opens in the in-app browser of LINE.
    • Close Window: Closes the LIFF app.
    • Get Profile: Gets the current user's profile.
    • Send Messages: Sends a sample message on behalf of the user if the LIFF app is opened in the chat screen.
    For API calls associated with the buttons, see Calling the LIFF API. For the received information, see Initializing the LIFF app.

Checking 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

Downloading and making 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
  2. Clone the line-liff-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 deploy and use the sample app. For the procedure of deploying your own web app as a LIFF app, see the following topics.