Docs
Docs
Connect LINE to your studio's system
A step-by-step guide to setting up Messaging API and LINE Login, so the system can send messages in the chat and members can log in to the app with their LINE account. You set it up once, with the owner's LINE account.
What you'll have when you're done
Two channels in the same Provider. One is linked to the LINE Official Account to send messages. The other lets members log in and open the member app.
Provider: the studio's company name
Messaging API channel
Linked to the LINE Official Account. Sends booking confirmations, class reminders and instructor alerts.
Webhook URL
https://booking.yourstudio.com/api/webhook
LINE Login channel and LIFF app
Members log in with their LINE account and open the member app from the chat menu.
Endpoint URL
https://booking.yourstudio.com/liff
What you need
- The owner's LINE account, which is an admin of the LINE Official Account.
- The studio's LINE Official Account. If you don't have one yet, sign up in LINE Official Account Manager.
- The studio's domain, already pointing to Cloud. See the Cloud page
- The company or business name, for naming the Provider.
Both channels must be in the same Provider
LINE gives each user a separate ID in each Provider. If LINE Login and Messaging API are in different Providers, the system can't message members who log in through the app, and a channel can't be moved to another Provider later.
Part 1
Messaging API
Lets the system send booking confirmations, class reminders and instructor alerts through the studio's LINE Official Account.
Step 1
Enable Messaging API
- 1Open LINE Official Account Manager, choose the studio's account, go to Settings, then choose Messaging API.
- 2Click Enable Messaging API.
- 3Choose the Provider to use for both channels, or create a new one named after your company, then click OK.
Once you choose a Provider, you can't change it later. Check the name before you click OK.
Since 2024, LINE no longer lets you create a Messaging API channel directly in the LINE Developers Console. You can only enable it from LINE Official Account Manager.
- Account settings
- Response settings
- Messaging API1
- Accounting
Haven Reformer › Settings
Messaging API
Messaging API is not enabled for this account.
Step 2
Copy the Channel ID and Channel secret
- 1Log in to the LINE Developers Console with the same account, choose the Provider, then choose the Official Account's channel. On the Basic settings tab, copy the Channel ID.
- 2Click Show next to Channel secret, then copy it.
Haven Studio Co., Ltd. › Haven Reformer
Channel ID1
Channel secret2
Step 3
Issue a Channel access token
- 1Go to the Messaging API tab and scroll down to Channel access token (long-lived).
- 2Click Issue, then copy the value.
If the token reaches anyone else, click Reissue right away. The old token stops working. Then send the new value to the Svana team.
Haven Studio Co., Ltd. › Haven Reformer
Channel access token
Channel access token (long-lived)1
Webhook settings
Webhook URL
Use webhook
Step 4
Set the Webhook URL
- 1On the Messaging API tab, click Edit under Webhook URL and paste:
https://booking.yourstudio.com/api/webhook - 2Click Verify. It should show Success.
- 3Turn on Use webhook.
If Verify fails, the system may not have the Channel secret yet. Send the values to the Svana team in step 10 first, then come back and click Verify again.
Haven Studio Co., Ltd. › Haven Reformer
Webhook settings
Webhook URL1
Use webhook3
Channel access token
Channel access token (long-lived)
Step 5
Turn off Auto-reply messages
- 1Go back to LINE Official Account Manager, open Settings and choose Response settings. Turn off Auto-reply messages so they don't overlap with the system's replies.
- 2Turn on Webhooks. You can leave Greeting message on to welcome new friends.
- Account settings
- Response settings
- Messaging API
- Accounting
Haven Reformer › Settings
Response settings
Greeting message
Welcome message for new friends, on or off
Auto-reply messages1
Off, so replies don't overlap with the system
Webhooks2
On, so messages reach the system
Part 2
LINE Login and LIFF
Lets members open the member app from the chat and log in with their LINE account, with no password to set.
Step 6
Create a LINE Login channel
- 1In the LINE Developers Console, choose the same Provider as in step 1, click Create a new channel, then choose LINE Login.
- 2For Region to provide the service, choose Thailand. For App types, choose Web app.
- 3Enter a Channel name, such as the studio's name followed by Member. It can't contain the word LINE. Add a description and an email address, then click Create.
Haven Studio Co., Ltd. › Create a new channel
Channel type
Provider1
Must be the same Provider as Messaging API
Region to provide the service2
Channel name3
Can't contain the word LINE
App types
Step 7
Copy the values and link the Official Account
- 1On the Basic settings tab, copy the Channel ID.
- 2Copy the Channel secret.
- 3Under Linked LINE Official Account, choose the studio's account so the app can invite members to add it as a friend.
To get members' email addresses from LINE, click Apply next to Email address permission on the same page. This is optional. The system works without email.
Haven Studio Co., Ltd. › Haven Reformer Member
Channel ID1
Channel secret2
Linked LINE Official Account3
OpenID Connect
Optional, if you want members' email addresses from LINE
Step 8
Add a LIFF app
- 1Go to the LIFF tab, click Add, then set Size to Full.
- 2For Endpoint URL, enter:
https://booking.yourstudio.com/liff - 3Under Scopes, select openid and profile. You can also select email once email permission is granted.
- 4For Add friend option, choose On (Aggressive) to invite members to add the account as a friend when they first log in.
- 5Click Add, then copy the LIFF ID and LIFF URL.
Haven Studio Co., Ltd. › Haven Reformer Member
LIFF app name
Size1
Endpoint URL2
Scopes3
Add friend option4
Step 9
Publish the channel
- 1Open the LIFF URL on your phone with the admin account and try logging in first.
- 2Click the Developing badge at the top of the channel, then confirm Publish.
While the channel is Developing, only admins and testers can log in. Once it's Published, it can't be changed back.
Haven Studio Co., Ltd.
Haven Reformer Member
LINE Login
Part 3
Send the values to Svana and set up the Rich menu
The Svana team adds all the values to the studio's system. Then set up the chat menu to open the member app.
Step 10
Send all 7 values to the Svana team
Tick off each value as you collect it, then send them all at once.
Send them only through the method the Svana team gave you. Don't paste these values into group chats or emails that many people can see. If a value gets out, issue a new one in the Console and tell the team again.
When the team confirms the values are in, go back to step 4 and click Verify again.
Values to send
0 of 7 ready
Step 11
Set up the Rich menu to open the member app
- 1In LINE Official Account Manager, go to Rich menus, click Create, then choose a template.
- 2Set each area's Action to Link, pointing to the LIFF URL followed by the page you want.
| Book a session | https://liff.line.me/2001234890-AbCdEfGh/booking |
|---|---|
| My bookings | https://liff.line.me/2001234890-AbCdEfGh/my-bookings |
| Packages | https://liff.line.me/2001234890-AbCdEfGh/packages |
| Home | https://liff.line.me/2001234890-AbCdEfGh |
Use the studio's LIFF ID in place of the sample. LINE opens the page added at the end of the URL inside the member app.
Haven Reformer › Rich menus › Create
Template 1
Action for area A 2
Type
URL
Action label
Step 12
Test before you tell members
- 1Open the studio's chat on your phone, tap the menu and log in with LINE. The member app should open on the studio's domain.
- 2Book one class and check that a confirmation arrives in the chat.
- 3Have an instructor type the activation phrase in the chat, such as Activate Instructor, to link their instructor account. Then try booking one of that instructor's classes.
Messages the system sends to members count toward the message quota of the studio's LINE Official Account plan.
If something goes wrong
Verify doesn't show Success
Check that the URL starts with https and ends with /api/webhook, matching https://booking.yourstudio.com/api/webhook, and that the Svana team has added the Messaging API Channel secret.
Members can log in but don't get messages in the chat
Check that LINE Login and Messaging API are in the same Provider, and that the member has added the Official Account as a friend and hasn't blocked it.
Admins can log in, but no one else can
The LINE Login channel is still Developing. Go back to step 9.
The app opens to a blank or wrong page
The LIFF Endpoint URL must be https://booking.yourstudio.com/liff, and the domain must already point to Cloud.
Members get two replies to one message
Auto-reply messages is still on in Response settings. Go back to step 5.
Screens in this guide are illustrations. Menu names follow the English versions of the LINE Developers Console and LINE Official Account Manager, and the real screens may differ slightly. For more detail, see Messaging API and LIFF in the LINE documentation.