Skip to content

fix(payments): document Non-custodial Manage scope for CDP API key#1668

Closed
fahadfa-aws wants to merge 1 commit into
awslabs:mainfrom
fahadfa-aws:fix/payments-t00-cdp-noncustodial-manage-scope
Closed

fix(payments): document Non-custodial Manage scope for CDP API key#1668
fahadfa-aws wants to merge 1 commit into
awslabs:mainfrom
fahadfa-aws:fix/payments-t00-cdp-noncustodial-manage-scope

Conversation

@fahadfa-aws

Copy link
Copy Markdown

Issue

Tutorial 00 Step 7 calls CreatePaymentInstrument, which fails with AccessDeniedException (The payment connector credentials are not authorized for this operation) when the CDP API key was created without the Non-custodial: Manage scope. The scope sits under Advanced settings at portal.cdp.coinbase.com/api-keys/secret and is off by default.

Until now, neither the Tutorial 00 README nor the CDP setup walkthrough mentioned it, so a fresh user hits an opaque AccessDenied at Step 7 with no clue what's wrong. Reproduced on 2026-06-12 against us-west-2.

Changes

  • providers/coinbase_cdp_account_setup.py — add the scope step to the on-screen API key creation walkthrough (Step 3a), with a one-line note about the failure mode.
  • .env.coinbase.sample — note the scope above the COINBASE_API_KEY_ID= line, where the operator pastes the key.
  • README.md Troubleshooting — add a CreatePaymentInstrument returns AccessDeniedException entry with the verbatim error string so a user who hits it can grep the README and find the fix.

Docs-only. No code semantics change.

Verification

Re-read the cited file:line at upstream HEAD 3a8d5352:

  • setup_agentcore_payments.py:323 is the dp_client.create_payment_instrument call that errors.
  • grep across the upstream 00-setup-agentcore-payments/ tree for "Non-custodial", "Manage", "wallet:create", "scope" → 0 hits before this PR.
  • AWS official docs at payments-getting-started.html Step 1 also omit the scope, so even users following the docs hit it.

Tutorial 00 Step 7 calls CreatePaymentInstrument, which fails with
AccessDeniedException ("The payment connector credentials are not
authorized for this operation") when the CDP API key was created
without the Non-custodial: Manage scope. The scope sits under
Advanced settings on portal.cdp.coinbase.com/api-keys/secret and
neither the README nor the CDP setup script mentioned it.

- providers/coinbase_cdp_account_setup.py: add the scope step to the
  on-screen API key creation walkthrough
- .env.coinbase.sample: note the scope above the CDP credential lines
- README.md: add a CreatePaymentInstrument AccessDenied troubleshooting
  entry with the verbatim error string
@fahadfa-aws

Copy link
Copy Markdown
Author

@mvangara10 — flagging this for your review when you have a moment. Tagged across the full set of payments-tutorial fixes I've been pushing today; happy to walk through any of them. Audit logs and test evidence are referenced in the PR description.

@fahadfa-aws

Copy link
Copy Markdown
Author

Superseded by #1738 (consolidated PR)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant