LINE account link: Sample code for LINE account link

LINE account link: Sample code for LINE account link

GoDocBuild Statusgoreportcard.com

This is sample code to demostration LINE chatbot account link, refer to document https://developers.line.biz/en/docs/messaging-api/linking-accounts/

You could see each step mark in comment (from step 1 to 12)

  1. The bot server calls the API that issues a link token from - the LINE user ID.
  2. The LINE Platform returns the link token to the bot server.
  3. The bot server calls the Messaging API to send a linking URL to the user.
  4. The LINE Platform sends a linking URL to the user.
  5. The user accesses the linking URL.
  6. The web server displays the login screen.
  7. The user enters his/her credentials.
  8. The web server acquires the user ID from the provider's service and uses that to generate a nonce.
  9. The web server redirects the user to the account-linking endpoint.
  10. The user accesses the account-linking endpoint.
  11. The LINE Platform sends an event (which includes the LINE user ID and nonce) via webhook to the bot server.
  12. The bot server uses the nonce to acquire the user ID of the provider's service.

Installation

  • Create your LINE Developer account and create a developer trial account.
    Deploy

  • Deploy this project to heroku

    • You need to fill following configuration during you create project.
      • LINECORP_PLATFORM_CHANNEL_CHANNELSECRET
      • LINECORP_PLATFORM_CHANNEL_CHANNELTOKEN
      • LINECORP_PLATFORM_CHANNEL_SERVERURL
  • Update the webhook url with https://xxx.herokuapp.com/callback in LINE developer

  • Done

If you don't want to deploy your own LINE account link chatbot, you can click follow to add friend

How to Use it

  • Input any test will show quick reply "account link" and "list user"

  • Input "list user"

  • Click link of "list user" will display all user from provider website.

Test account link

  • Input "link"

  • Input ID, PW. (refer from "list") (e.g. "11", "pw11")

  • Click "Click link to completed account link" to link your account to chatbot.

  • Close browser

  • Chatbot already link to your account, input any text will show your information.

Similar Resources

AI-powered code snippet generator using ChatGPT. Generate code in various languages based on natural language descriptions!

SnipForge - AI-Powered Code Snippet Generator SnipForge is a powerful command-line interface (CLI) tool that utilizes OpenAI's GPT technology to gener

May 5, 2023

Vale is a command-line tool that brings code-like linting to prose

Vale is a command-line tool that brings code-like linting to prose

Vale: Your style, our editor Vale is a command-line tool that brings code-like linting to prose. It's fast, cross-platform (Windows, macOS, and Linux)

Jan 3, 2023

Go package to make lightweight ASCII line graph ╭┈╯ in command line apps with no other dependencies.

Go package to make lightweight ASCII line graph ╭┈╯ in command line apps with no other dependencies.

asciigraph Go package to make lightweight ASCII line graphs ╭┈╯. Installation go get github.com/guptarohit/asciigraph Usage Basic graph package main

Jan 8, 2023

An open-source GitLab command line tool bringing GitLab's cool features to your command line

An open-source GitLab command line tool bringing GitLab's cool features to your command line

GLab is an open source GitLab CLI tool bringing GitLab to your terminal next to where you are already working with git and your code without switching

Dec 30, 2022

A command line tool that builds and (re)starts your web application everytime you save a Go or template fileA command line tool that builds and (re)starts your web application everytime you save a Go or template file

# Fresh Fresh is a command line tool that builds and (re)starts your web application everytime you save a Go or template file. If the web framework yo

Nov 22, 2021

A command line tool to prompt for a value to be included in another command line.

readval is a command line tool which is designed for one specific purpose—to prompt for a value to be included in another command line. readval prints

Dec 22, 2021

Reads from existing Cloud Providers (reverse Terraform) and generates your infrastructure as code on Terraform configuration

Reads from existing Cloud Providers (reverse Terraform) and generates your infrastructure as code on Terraform configuration

TerraCognita Imports your current Cloud infrastructure to an Infrastructure As Code Terraform configuration (HCL) or/and to a Terraform State. At Cycl

Dec 30, 2022

Display a message in morse code on your capslock LED, keyboard backlight or using your screen brightness!

Display a message in morse code on your capslock LED, keyboard backlight or using your screen brightness!

halp halp is a command line utility that lets you display messages in morse code on your capslock LED, keyboard backlight (if you have it) or using yo

Jan 26, 2022

A tiny "sandbox" to run untrusted code 🏖️

Sandy A tiny sandbox to run untrusted code. 🏖️ Sandy uses Ptrace to hook into READ syscalls, giving you the option to accept or deny syscalls before

Nov 14, 2022
Command-line utility to grab Github gists from your own account.
Command-line utility to grab Github gists from your own account.

gistfetch Command-line utility to grab Github gists from your own account. How do I use this? Add an API token with permissions to read Gists Fetch th

Dec 14, 2021
Make Link with Markdown Format
Make Link with Markdown Format

ml -- Make Link with Markdown Format This package is required Go 1.16 or later. Build and Install $ go install github.com/spiegel-im-spiegel/gpgpdump@

Mar 20, 2022
Sample API made in Go

GoAPI-sample Sample API made in Go. Especially for those who want to develop API in Go and are beginners. Variables Endpoint Vars - /token - To genera

Sep 28, 2022
A sample FaaS function that gets a stock quote and 30 day history by symbol and returns a HTML page with a generates SVG sparkline.

faas stonks This uses serverless technology to get a stock quote and 30 day sparkline from Yahoo Finance. Deployment Nimbella account Namespace with o

Sep 23, 2021
sample-go-test-app-vaibhav is a simple example of a production ready RPC service in Go

sample-go-test-app-vaibhav sample-go-test-app-vaibhav is a simple example of a production ready RPC service in Go. Instead of attempting to abstract a

Dec 2, 2021
Test-app-url-shortner - A sample url shortener app to test Keploy integration capabilities
Test-app-url-shortner - A sample url shortener app to test Keploy integration capabilities

test-app-url-shortner A sample url shortener app to test Keploy integration capa

Jan 23, 2022
A simple CLI app to update dynamic DNS settings for your CloudFlare account

Cloudflare Dynamic DNS Updater (Go) written by Darren Rambaud Why? A simple CLI app to update dynamic DNS settings for your CloudFlare account. Useful

Nov 28, 2021
CLI for Shopware Account

Shopware CLI A cli which contains handy helpful commands for daily Shopware tasks Features Manage your Shopware account extensions in the CLI Build an

Dec 15, 2022
Azure-nuke - The CLI tool to delete all resources in an Azure Account

azure-nuke This repository would contain the CLI tool to delete all resources in

Jun 8, 2022
Sloc, Cloc and Code: scc is a very fast accurate code counter with complexity calculations and COCOMO estimates written in pure Go
Sloc, Cloc and Code: scc is a very fast accurate code counter with complexity calculations and COCOMO estimates written in pure Go

Sloc Cloc and Code (scc) A tool similar to cloc, sloccount and tokei. For counting physical the lines of code, blank lines, comment lines, and physica

Jan 8, 2023