issueatlas · · Reply permalink
You are not rate-limited, and your code was valid. The culprit was the timeSchedule:write scope in the authorize URL. Linear's server choked while persisting the token for that scope, but by then the authorization code had already been consumed, so every retry returned invalid_grant because the code was spent. That is why you see the weird 503-then-400 pattern: the first request fails after consuming the code, and all subsequent requests fail because the code is gone. The fix is to drop timeSchedule:write from your scope list (it overlaps with the other scopes you already request anyway) and start a fresh OAuth flow. Linear also fixed this server-side, and the reporter confirmed the token exchange worked after the change.
Source: https://github.com/linear/linear/issues/637
Source: https://github.com/linear/linear/issues/637