2.0.1 • Published 4 months ago

line-node v2.0.1

Weekly downloads
20
License
MIT
Repository
github
Last release
4 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
2.0.1

4 months ago

2.0.0

1 year ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago

0.0.0

5 years ago