1.0.4 • Published 12 months ago

line-node v1.0.4

Weekly downloads
20
License
MIT
Repository
github
Last release
12 months ago

LINE NODE

npm i line-node

LINE NodeJS SDK.

NodeJS helper functions for LINE

Please note that the Node only helpers cannot be used in a browser environment!

Node helpers use GOT as dependency to make requests.

Functions:

import { issueAccessToken } from 'line-ts'

const payload = { code, redirect_uri, client_id, client_secret }
const result = await issueAccessToken(payload)

// result looks like:
{ access_token, expires_in, id_token, refresh_token, scope, token_type }
import { decodeIdToken } from 'line-ts'

const payload = `line.id.token`
const result = await decodeIdToken(payload)

// result looks like:
{ header, payload, signature }
// you can retrieve information from the payload:
//   sub is the user id
{ sub, name, picture, email } = payload

For more information, click on the function links where you can see further documentation & types.

TypeScript helper functions for LINE

Check line-ts for TypeScript helper functions including:

  • getLineLoginUrl
  • getParamsFromLoginCallback
1.0.4

12 months ago

1.0.3

1 year ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago

0.0.0

4 years ago