Skip to content

Commit 1d919cd

Browse files
pseay-imbueSculptorclaude
committed
Trim Ramp OAuth scopes to exactly the agent-tools set
Drop the four regular-REST-only scopes (agent_account_numbers:read, applications:read, applications:write, bank_accounts:read) from the authorize request. Agent keys can't use the standard REST API, so those scopes grant nothing usable. What remains is exactly the 26 scopes Ramp's agent-tools OpenAPI declares -- keeping latchkey aligned with the agent-tools-only detent permissions. Co-authored-by: Sculptor <sculptor@imbue.com> Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 016cb77 commit 1d919cd

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

src/services/ramp.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,16 @@ const RAMP_OAUTH_CALLBACK_PATH = '/callback';
4040
const RAMP_LOGIN_TIMEOUT_MS = 300_000;
4141

4242
/**
43-
* Scopes requested on the authorize URL: the agent-tools scope set Ramp's OpenAPI
44-
* declares. Ramp grants only the subset the signed-in user is entitled to (returned
45-
* in the token's `scope`), so over-requesting is harmless, but omitting a scope an
46-
* endpoint needs fails at call time with DEVELOPER_7100.
43+
* Scopes requested on the authorize URL: exactly the scopes Ramp's agent-tools
44+
* OpenAPI declares (no regular-REST-only scopes -- agent keys can't use the standard
45+
* REST API anyway). Ramp grants only the subset the signed-in user is entitled to
46+
* (returned in the token's `scope`), so over-requesting is harmless, but omitting a
47+
* scope an endpoint needs fails at call time with DEVELOPER_7100.
4748
*/
4849
const RAMP_OAUTH_SCOPES = [
4950
'accounting:read',
50-
'agent_account_numbers:read',
5151
'ai_spend:read',
52-
'applications:read',
53-
'applications:write',
5452
'approvals:write',
55-
'bank_accounts:read',
5653
'bills:read',
5754
'cards:read_agentic',
5855
'cards:write',

0 commit comments

Comments
 (0)