Slide 1

Slide 1 text

LINE Social API in GO LINE Technical Evangelist Evan Lin

Slide 2

Slide 2 text

(YDQ/LQ /,1(7HFKQLFDO(YDQJHOLVW • 'HYHORSHU 5HODWLRQV • 7HFKQLFDO EUDQGLQJ • 7HFKQLFDO +LULQJ • /,1( 'HYHORSHU 0HHWXS7HFK3XOVH 2UJDQL]HU

Slide 3

Slide 3 text

NEW API Update

Slide 4

Slide 4 text

https://developers.line.biz/en/news/#new-messaging-api-endpoints-for-friend-statistics-2019-07-08

Slide 5

Slide 5 text

The same result with CMS ”Insight”

Slide 6

Slide 6 text

LINE need your contributions (Python, Nodejs, Ruby …)

Slide 7

Slide 7 text

LINE Social API in Go

Slide 8

Slide 8 text

LINE Social API • API to handle “User Access Token”, it help to retrieval user profile data. • “Issue access token” is process during you run LINE Login. • Another way is to use “liff.getAccessToken()”.

Slide 9

Slide 9 text

LINE Social API in Go https://github.com/kkdai/line-social-sdk-go

Slide 10

Slide 10 text

How to use LINE Social API in Go? • Github REPO: https://github.com/kkdai/line- login-go • Heroku server: https://login-tester- evan.herokuapp.com/

Slide 11

Slide 11 text

LINE Login •LINE Login include two kinds of scope. •“Profile OpenID” will return JWT data to decode into user profile. •“Profile” only return access token, need use “social API” to get user profile.

Slide 12

Slide 12 text

LINE Login: Open ID Diagram

Slide 13

Slide 13 text

Code block for LINE Login (Open ID) in Go

Slide 14

Slide 14 text

Code block for LINE Login (Open ID) in Go (2)

Slide 15

Slide 15 text

LINE Login: Profile Diagram

Slide 16

Slide 16 text

Code block for LINE Login (Profile) in Go

Slide 17

Slide 17 text

Comparison Open ID Access Token LINE Login Scope profile openid profile Need extra API No Social get user profile Need decode data JWT decode No

Slide 18

Slide 18 text

Q&A