LINE for 3DS setup instructions
- Index
- Overview
- What you need
- Create your LINE account
- Create your LINE BOT (3DS account)
- Set up your Google drive
- Set up your 3DS
- FAQ
- How do I (or let someone) add my 3DS account as a friend?????
- How do I set up Google Apps Script URL on my 3DS if camera is not working?????
- How do I check my Google Apps Script URL?????
- Why do I get a auto reply message when sending message to my 3DS (or adding 3DS account as a friend)?????
- Why do I get an error message while setting Google Apps Script on my 3DS?????
- Why Create a Messaging API channel is disabled?????
- Why Google Apps Script says "authorization required" or "review permission"?????
LINE for 3DS uses:
LINE BOT API
(green one) to communicate with normal LINE user.Google drive
(red one) for storage (images, audio, etc...).Google Spreadsheets
for storage (chat logs).Google Apps Script
to send/receive messages to/from LINE server.
3DS
(pink one) to run LINE for 3DS application.
As you can see, 3DS never talks with LINE server
directly, instead 3DS will talk with Google Apps Script
(i.e. Google server).
To set up LINE for 3DS, you need
PC
andphone
(at least one of them, having both of them are strongly recommended).Unrestricted Internet connection
toGoogle
andLINE
(andApple
if you are using iOS) servers.Google account
(andApple account
(iOS)) (and only in some country,SMS capable phone number
).- MOST IMPORTANT ONE :
Patience
(at least enough to complete the setup steps without skipping any steps).
If you already have LINE account, move on to the next step.
If you haven't installed LINE app (iOS, Android) on your phone (or Android emullator), install it first.
- Open LINE app and tap on
Sign up
. - Then select country.
- As of January 2024, if you select Japan, Hong Kong, Taiwan, Korea or Thailand you are required to verify phone number otherwise you need to log in with your Google account (Android) or Apple account (iOS).
- Then enter a phone number and continue or log in with Google or Apple.
- Set up your account (account name can be anything).
- Congratrations!!!!!, you've successfully made your account!!!!!
Now, you have LINE account on your phone (or Android emulator), then you need to make a LINE BOT that will be your 3DS account.
If you already have LINE developer account, move on to the next step.
First, we need to make a LINE developer account.
- Go to LINE developer and click on
Log in to Console
. - Then select
Log in with LINE account
to log in. - If this is the first time to log in to LINE developer, you'll be prompted to make a business account, if so click on
Create LINE Business ID
to make it. - Set up your account (developer name can be anything).
- Congratrations!!!!!, you've successfully made your LINE developer account!!!!!
If you already have a LINE BOT, move on to the next step.
Then, let's create a LINE BOT.
- Click on
Create a new provider
- Enter provider name (any name) and click on
Create
. - Next, you need to create a BOT channel, click on
Create a Messaging API channel
(If you can't create it, see Why Create a Messaging API channel is disabled?????). - Fill the information and continue.
- Click on
Messaging API
- Go to bottom of the page and click on
Issue
to generate your access token. Also you can change account settings if you want (you can do it anytime).Allow bot to join group chat
: Whether your 3DS account can join group (not DM) chat (recommendation : enable).Auto-reply messages
: Whether your 3DS account automatically send a reply message when it receives messages (recommendation : disable).Greeting messages
: Whether your 3DS account automatically send a greeting message when someone follow (add as a friend) your 3DS account (recommendation : disable).
- Congratrations!!!!!, you've successfully made your BOT account!!!!! We'll use this page later so don't close this tab.
In this step, we'll set up Google Sheets
(acts as a chat logs storage) and Google Apps Script
(acts as a server).
First, let's create folder and files on your Google drive.
- Go to Google drive and log in to your Google drive (create a Google account if you don't have it).
- After logging in, click on
New
. - Click on
New folder
to make a new folder then name itLINE_for_3DS
. - Open
LINE_for_3DS
folder - Create
Google Sheets
andGoogle Apps Script
and don't close opend tabs!!!!! - If you get a warning when creating Google Apps Script, click on
Create script
. - Optionally, you can rename (any name) your
Google Sheets
andGoogle Apps Script
. - Congratrations!!!!!, you've successfully prepared your Google drive!!!!!
Then, let's set up your Google Apps Script.
- Open your
Google Apps Script
and DELETE ALL OF code to empty your script first. - After emptying your script, copy & paste ALL OF this script on your
Google Apps Script
and save it (click onsave icon
or pressCTRL + S
). - Next, check if script works fine by selecting
Test_spot
and click onRun
. - If you are prompted to review permission, grant access to your script (see Why Google Apps Script says "authorization required" or "review permission"????? if you don't know how to do that).
- Then, you shoud see version number and
OK
in the log box (if you don't see log box, click onExecution log
), if you see something else such asReferenceError: Copy_paste_checker is not defined
it means you haven't copy & pasted ALL OF script code, in that case try again from step 1. - Set account information to your Google Apps Script.
APP_USER_ACCESS_TOKEN
: Access token for your LINE BOT account. Go back to LINE developer tab, copy channel access token (click oncopy icon
) and paste it.APP_USER_GOOGLE_SHEET_ID
: Google sheets ID for chat logs. Go back to Google sheets tab, copy sheet ID without/
(slash).APP_USER_CLIENT_NAME
: Your BOT account name, this is only shown on your 3DS and can be different from your LINE BOT account name.APP_USER_TIMEZONE
: Timezone for chat logs, this is only shown on your 3DS and can be different from your actual timezone.APP_USER_TIME_FORMAT
: Time format for chat logs, this is only shown on your 3DS.APP_USER_PASSWORD
: Your password (make something new, can be anything except special (non-1byte) character).
- Click on
Deploy
andNew deployment
. - Click on
Settings icon
andWeb app
. - Set parameters as below then click on
Deploy
.Execute as
: Me so that script can access your Google Drive.Who has access
: Anyone so that your 3DS and LINE server can access.
- If you are prompted to review permission, grant access to your script (see Why Google Apps Script says "authorization required" or "review permission"????? if you don't know how to do that).
- Click on
Copy
to copy your script URL (we'll use it in next step), finally click onDone
. - Congratrations!!!!!, you've (almost) finished setting up your Google Apps Script!!!!!
After deploying your script, check if everything goes fine until now first, then perform the final step of the Google Apps Script setup.
- Paste your script URL (see How do I check my Google Apps Script URL????? if you don't know how to check your Google Apps Script URL) to your browser, add
?op=setup
to it (so your URL should behttps://script.google.com/macros/s/xxxxxxxxxxxxxxxxxxxxxxx/exec?op=setup
now) and open it. It may take a while to load the page, so be patient, don't close the tab!!!!!. - If everything goes fine until now, you should only see an error for
Webhook settings validation
(we need to manually enable use of webhook because LINE DOES NOT PROVIDE SUCH API TO US!!!!!). - Go back to LINE developer tab, and click on
Use webhook
to enable it. - Go back to your script tab and reload it. You should see no errors (and you should see QR code instead).
- Congratrations!!!!!, you've successfully configure your Google Apps Script!!!!! We'll use this page later so don't close this tab.
We are almost there, this is the final step of the setup.
- Install and open LINE for 3DS on your 3DS.
- Touch on LINE icon to open it.
- Type your Google Apps Script password (
APP_USER_PASSWORD
). Unlike older version (v1.x.x), you MUST type your Google Apps Script password or it will NOT work at all. - Touch on Change GAS URL (or press
X
button) and select camera (if your camera is not working, see How do I set up Google Apps Script URL on my 3DS if camera is not working?????). - Go back to Google Apps Script setup page (step 5) and scan the QR code.
- Be patient until
Please wait
message disappear (if you get any error messages, see Why do I get an error message while setting Google Apps Script on my 3DS?????). - Add your BOT account (3DS account) as a friend on your LINE account (if you don't know how to do that, see How do I (or let someone) add my 3DS account as a friend?????).
- Touch on
IDs
room. - Touch on
Receive
then touch onUpdate logs
(or pressB
button). - You should see
Touch to add this ID
, touch on it. - Touch on
Confirm
(right button) without editing text. - New chat room should be added, touch on it.
- Touch on
Receive
then touch onUpdate logs
(or pressB
button) (same as step 9). - You should see followed message (and chat logs if you send something to your 3DS account).
- Touch on
Send
then touch onSend a message
(or pressA
button) to send something from your 3DS. - You should see message on both your 3DS and official LINE application.
- Congratrations!!!!!, you've successfully set up LINE for 3DS!!!!!
If you haven't set up your LINE developer account and LINE BOT, set up them first (see Create your LINE BOT (3DS account) if you don't know how to do it).
To add your 3DS account as a friend, you can use either QR code or ID.
- Go to LINE developer and log in to your developer account.
- Click on
Messaging API
.
If you can't scan the QR code on your 3DS, you can use URL shortener such as t.ly and reduced.to.
- Shorten your Google Apps Script with URL shortener (see How do I check my Google Apps Script URL????? if you don't know how to check your Google Apps Script URL).
- Touch on
Change GAS URL
andkeyboard
. - Type your short URL and touch on
confirm
. - Be patient until
Please wait
message disappear (if you get any error messages, see Why do I get an error message while setting Google Apps Script on my 3DS?????).
If you haven't deployed your Google Apps Script, you need to deploy it first (see Set up your Google Apps Script (step 7-11) if you don't know how to do it).
If you forget your Google Apps Script URL after deploying it, you can check it with following steps.
- Open your Google Apps Script.
- Click on
Deploy
andManage deployments
. - You should see your Google Apps Script URL under Web app section.
Why do I get a auto reply message when sending message to my 3DS (or adding 3DS account as a friend)?????
This is because LINE BOT API has features called Auto-reply messages
and Greeting messages
and they are enabled by default.
You can disable them with following steps.
- Go to LINE developer and log in to your developer account.
- Click on
Messaging API
and scroll down. - Disable
Auto-reply messages
and/orGreeting messages
as you like.
If you get an error something like curl returned NOT success
or curl_easy_perform() failed
it most likely either:
- Your Internet connection is unstable (or disconnected).
- Using wrong short URL (typo) (If you are using short URL method).
- If you are sure that URL is not wrong, try using different URL shortener.
- Using wrong Google Apps script URL when creating short URL (if you are using short URL method).
- If you are sure that you've specified correct Google Apps Script URL, try making different Google Apps Script and try again.
If you get an error something like jsmn returned NOT success
it most likely either:
- You haven't deployed or deployed your Google Apps Script with wrong permission (see Set up your Google Apps Script (step 7-11) for detail).
- If you are sure that you've deployed your Google Apps Script with correct permissions, try making different Google Apps Script and try again.
- Using wrong short URL (typo) (If you are using short URL method).
- If you are sure that URL is not wrong, try using different URL shortener.
- Using wrong Google Apps script URL when creating short URL (if you are using short URL method).
- If you are sure that you've specified correct Google Apps Script URL, try making different Google Apps Script and try again.
Some people report this problem while exact reason is still unknown, it seems Messaging API
is not available in some country.
Possible workarounds:
- Use different country when creating your LINE account.
Some people report that if you log in with multiple account, this step fails.
Possible workarounds:
- Use private browsing mode and log in with only 1 account then try again.
- Use different browser and log in with only 1 account then try again.
- Log out and remove all accounts and log in with only 1 account then try again.
If you get this message, you need to grant permissions to your Google Apps Script.
- Click on
Review permissions
, - Select your Google account (select Google account that you used to create this script, otherwise it won't work as you expected)
- Click on
Advanced
(screenshot saysHide advanced
because I already clicked it) and click onGo to {Your Google Apps Script name} (unsafe)
- Finally, click on
Allow
to grant permission to your script.