larksuite / larksuite/cli

auth login fails with HTTP 403 (non-JSON) when minutes:minutes.transcript:export is combined with task:* scopes

Open
#1,846 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug domain/auth domain/core domain/minutes domain/task
Dominant language
Go
Stars
17.3k
Forks
1.4k
Avg merge
2d 4h
Merged PRs (30d)
105

Description

Summary

On lark-cli auth login (Device Flow), requesting a scope set that includes both minutes:minutes.transcript:export and the task:* scopes makes the device-authorize request fail with HTTP 403 and a non-JSON body (surfaced as "response not JSON"). Login aborts. Dropping that one scope lets login succeed.

Environment

  • lark-cli v1.0.67, brand lark (open.larksuite.com), custom app, user login, macOS

Bisection (reproduction)

  • Full 42-scope set incl. the combo → 403, non-JSON.
  • Each scope requested on its own → succeeds.
  • Dropping only minutes:minutes.transcript:export (keeping task:*) → login succeeds, 41/42 granted; minutes:minutes and minutes:minutes.media:export still granted.
  • Reordering the scopes in the request changes whether it 403s.

The "passes solo, fails only in combination, order-sensitive, 403 + non-JSON body" signature points to a gateway/WAF false-positive on the request rather than an app-config or per-scope permission error (genuine scope errors return JSON 99991xxx).

Impact

Can't mint a user token that includes transcript-export-as-user without dropping minutes:minutes.transcript:export from the login scope set.

Questions

  • Known gateway/WAF interaction with this scope combination?
  • Would chunking the authorize into smaller scope batches (or different ordering/encoding) be a workaround the CLI could adopt?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the lark-cli auth login Device Flow entry point and reproduce the device-authorize request with the documented scope combinations and orderings. Trace how HTTP 403 responses with non-JSON bodies are handled; done means the scope combination has a confirmed CLI workaround or an established external-gateway limitation and the result is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, authentication, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.