docs: persist authToken across sessions + warn about REST Accept header - #212
Open
enkunkun wants to merge 1 commit into
Open
docs: persist authToken across sessions + warn about REST Accept header#212enkunkun wants to merge 1 commit into
enkunkun wants to merge 1 commit into
Conversation
enkunkun
force-pushed
the
docs/persist-authtoken-and-bun-note
branch
from
July 23, 2026 00:51
1d524e6 to
effdd73
Compare
…ader
Two small documentation additions covering footguns I hit while integrating
LINEJS from Bun/TypeScript. Both were nontrivial to diagnose from the existing
docs.
- docs/auth.md: add "Persisting authToken across sessions" section showing
the `update:authtoken` + FileStorage pattern. FileStorage auto-persists
`cert`, `refreshToken` and `expire` (per
packages/linejs/base/storage/kvTypes.ts) but `authToken` itself is not one
of them — users must save it themselves via the event. Without an example
this is easy to miss, and the next-run fallback to loginWithPassword
increases ban risk.
- docs/methods.md: add "Calling LINE REST endpoints directly" note. The
default client.base.request.getHeader("GET") returns
`accept: application/x-thrift`, which causes JSON REST endpoints (Album /
Moa, parts of Timeline, ...) to reject the request with
`{"code":102001,"message":"一時的なエラーが発生しました。"}` at HTTP 200.
Documenting the required `accept: application/json` override saves the
next user a few hours.
enkunkun
force-pushed
the
docs/persist-authtoken-and-bun-note
branch
from
July 23, 2026 00:51
effdd73 to
69a4533
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Two small documentation additions covering footguns I hit while integrating
LINEJS from Bun/TypeScript. Both were nontrivial to diagnose from the existing
docs.
docs/auth.md— new Persisting authToken across sessions sectionshowing the
update:authtoken+FileStoragepattern.FileStorageauto-persistscert,refreshTokenandexpire(perpackages/linejs/base/storage/kvTypes.ts) butauthTokenis not in theknown key set, so users must save it themselves via the
update:authtokenevent. Without an example this is easy to miss, and thenext-run fallback to
loginWithPasswordincreases ban risk.docs/methods.md— new Calling LINE REST endpoints directly note.client.base.request.getHeader("GET")returnsaccept: application/x-thrift, which causes JSON REST endpoints (Album /Moa, parts of Timeline, ...) to reject the request with
{"code":102001,"message":"一時的なエラーが発生しました。"}at HTTP 200. Documentsthe required
accept: application/jsonoverride.Docs-only, no code or test changes.
Checklist
vitepress buildsucceeds (verified locally)