sentry-app-installations authorizations endpoint intermittently returns 401 after ~15s
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 44.8k
- Forks
- 4.9k
- Avg merge
- 21h 23m
- Merged PRs (30d)
- 607
Description
Environment
SaaS (https://sentry.io/)
Steps to Reproduce
- Install a public integration on an org.
- Refresh the installation token with the JWT bearer grant: POST /api/0/sentry-app-installations/{uuid}/authorizations/, grant_type: urn:sentry:params:oauth:grant-type:jwt-bearer.
- Repeat across a few hundred installations. A small number fail.
Expected Result
201 with a new token, in ~2s.
Actual Result
401 after ~15s, 38-byte body.
Sample from one hour, 2026-08-06 00:30–01:30 UTC:
- ~40 refreshes returned 201 in 1.5–2.4s
- 2 returned 401 at 15.204s and 15.209s
- 3 returned 500 at 11–12s
One of the 401 installations had returned 200 in 332ms on GET /api/0/organizations/{slug}/teams/ 59 minutes earlier and was still installed afterwards. Retrying the refresh later has succeeded with no change on the installation side.
Happy to share installation UUIDs and timestamps privately.
Product Area
Settings - Integrations
Link
No response
DSN
No response
Version
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the POST /api/0/sentry-app-installations/{uuid}/authorizations/ endpoint and its JWT bearer grant handling. Reproduce the issue by refreshing tokens across many installations and recording responses and timings, including the reported 401 and 500 cases. Done means valid refreshes reliably return 201 with a new token rather than intermittent failures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, authentication, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100