Add rich menu summary and daily report to the Insight API#128
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
JAVAYou can check generated code in java |
NODEJSYou can check generated code in nodejs |
PHPYou can check generated code in php |
PYTHONYou can check generated code in python |
GOYou can check generated code in go |
RUBYYou can check generated code in ruby |
mokuzon
approved these changes
Jul 1, 2026
This was referenced Jul 1, 2026
mokuzon
pushed a commit
to line/line-bot-sdk-php
that referenced
this pull request
Jul 1, 2026
…ceGroupFailedType` emum (#857) line/line-openapi#128 line/line-openapi#124 --------- Co-authored-by: github-actions <github-actions@github.com>
mokuzon
pushed a commit
to line/line-bot-sdk-java
that referenced
this pull request
Jul 1, 2026
…ceGroupFailedType` emum (#1925) line/line-openapi#128 line/line-openapi#124 Co-authored-by: github-actions <github-actions@github.com>
mokuzon
pushed a commit
to line/line-bot-sdk-go
that referenced
this pull request
Jul 1, 2026
…ceGroupFailedType` emum (#708) line/line-openapi#128 line/line-openapi#124 Co-authored-by: github-actions <github-actions@github.com>
mokuzon
pushed a commit
to line/line-bot-sdk-python
that referenced
this pull request
Jul 1, 2026
…ceGroupFailedType` emum (#1027) line/line-openapi#128 line/line-openapi#124 Co-authored-by: github-actions <github-actions@github.com>
mokuzon
pushed a commit
to line/line-bot-sdk-nodejs
that referenced
this pull request
Jul 1, 2026
…ceGroupFailedType` emum (#1689) line/line-openapi#128 line/line-openapi#124 Co-authored-by: github-actions <github-actions@github.com>
mokuzon
pushed a commit
to line/line-bot-sdk-ruby
that referenced
this pull request
Jul 1, 2026
…ceGroupFailedType` emum (#849) line/line-openapi#128 line/line-openapi#124 Co-authored-by: github-actions <github-actions@github.com>
This comment was marked as off-topic.
This comment was marked as off-topic.
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.
Summary
Adds two endpoints to the Insight API for the impression and click statistics of rich menus created via the Messaging API:
/v2/bot/insight/richmenu/{richMenuId}/summary/v2/bot/insight/richmenu/{richMenuId}/dailysummaryreturns metrics aggregated over the whole period;dailyreturns per-day metrics.Why
These endpoints let developers retrieve impression and click statistics for rich menus they create through the Messaging API (
POST /v2/bot/richmenu), using the standard public Messaging API surface — the same kind of insight already offered for messages and followers.Details
Common to both endpoints:
fromandto, both inclusive, formatyyyyMMdd, time zone UTC+9.frommust be within the most recent 3 years.bounds(top-leftx,y,width,height).metricsFrom/metricsTo(the period actually covered) and the per-daydateare returned asyyyyMMddstrings (JST), consistent with thefrom/torequest parameters.richMenuIdis returned and the other fields are omitted.Per-endpoint period limit:
summary:tocan be up to 396 days afterfrom.daily:tocan be up to 99 days afterfrom.Example — summary
GET /v2/bot/insight/richmenu/{richMenuId}/summary?from=20260213&to=20260215{ "richMenuId": "richmenu-0123456789abcdef0123456789abcdef", "metricsFrom": "20260213", "metricsTo": "20260215", "impression": { "metrics": { "count": 567, "uniqueUsers": 300 } }, "clicks": [ { "bounds": { "x": 0, "y": 0, "width": 400, "height": 250 }, "metrics": { "count": 123, "uniqueUsers": 45 } }, { "bounds": { "x": 400, "y": 0, "width": 400, "height": 250 }, "metrics": { "count": 45, "uniqueUsers": 24 } } ] }Example — daily
GET /v2/bot/insight/richmenu/{richMenuId}/daily?from=20260213&to=20260215{ "richMenuId": "richmenu-0123456789abcdef0123456789abcdef", "metricsFrom": "20260213", "metricsTo": "20260215", "impression": { "metrics": [ { "date": "20260213", "count": 300, "uniqueUsers": 191 }, { "date": "20260214", "count": 267, "uniqueUsers": 222 } ] }, "clicks": [ { "bounds": { "x": 0, "y": 0, "width": 400, "height": 250 }, "metrics": [ { "date": "20260213", "count": 45, "uniqueUsers": 22 }, { "date": "20260214", "count": 78, "uniqueUsers": 35 } ] } ] }Below the privacy threshold
{ "richMenuId": "richmenu-0123456789abcdef0123456789abcdef" }