Skip to content

Fix profile API key creation using IAM v1 - #704

Open
andrewdmaclean-work wants to merge 1 commit into
twilio:mainfrom
andrewdmaclean-work:fix/iam-v1-profile-key-creation
Open

Fix profile API key creation using IAM v1#704
andrewdmaclean-work wants to merge 1 commit into
twilio:mainfrom
andrewdmaclean-work:fix/iam-v1-profile-key-creation

Conversation

@andrewdmaclean-work

Copy link
Copy Markdown

Summary

The twilio login and profiles:create commands currently create API keys through the v2010 Keys resource. Some accounts receive a 20003: Policy evaluation failed response from this endpoint despite using valid Account SID and Auth Token credentials.

This change uses the IAM v1 Keys resource to create the Standard API key stored in CLI profiles.

Changes

  • Create profile API keys through iam.twilio.com/v1/Keys
  • Preserve existing credential validation and profile storage
  • Update tests for default and regional IAM endpoints
  • Preserve Standard API-key behavior

Testing

  • Full test suite: 207 passing
  • Repository lint passes
  • Verified IAM v1 successfully creates and deletes Standard and Restricted keys

The standalone diagnostic script used to compare endpoints is intentionally not included in this PR.

shrutiburman
shrutiburman previously approved these changes Aug 11, 2026
@shrutiburman
shrutiburman dismissed their stale review August 12, 2026 04:59

Not needed anymore.

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.

2 participants