Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

twilio-iam-auth-setup

БесплатноБез исполняемых скриптовНе проверен

Set up and manage Twilio authentication credentials: Auth Tokens, API keys (Standard, Main, Restricted), Access Tokens for client-side SDKs, and credential…

openaiот openai★ 8 494 звезды на GitHub

Об этом скилле

Overview

Twilio supports multiple authentication methods. For most developers: use Auth Token for local prototyping, then move to API Keys in production.

Method Use for Security
Account SID + Auth Token Local prototyping, initial testing Full account access — avoid in production
Account SID + API Key (Standard) + Secret All production code Recommended — revocable, no access to /Accounts or /Keys
Account SID + API Key (Restricted) + Secret Fine-grained production access Best — limit to specific resources only
Account SID + API Key (Main) + Secret Account management automation Full access like Auth Token, but revocable

For beginners / vibe-coders: Start with Auth Token to get your first API call working, then create a Standard API Key before deploying anything. The key difference: if an API Key leaks, you revoke just that key. If your Auth Token leaks, your entire account is exposed until you rotate it.


Prerequisites

  • Twilio account — see twilio-account-setup if you don't have one
  • Access to the Twilio Console

Quickstart

Find your Account SID and Auth Token in the Console dashboard.

Python

import os
from twilio.rest import Client

client = Client(os.environ["TWILIO_ACCOUNT_SID"], os.environ["TWILIO_AUTH_TOKEN"])

Node.js

const client = require("twilio")(
    process.env.TWILIO_ACCOUNT_SID,
    process.env.TWILIO_AUTH_TOKEN
);

Never commit Auth Token to version control or use in production.


Key Patterns

API Keys (production)

Create: Console > Account > API keys & tokens > Create API key

Key type Access Use case
Standard All resources except /Accounts and /Keys endpoints Default for production apps
Restricted Only the specific resources you grant Multi-tenant apps, microservices, least-privilege
Main Full account access (like Auth Token) Account management automation (Console-only creation)

After creation, copy the API Key SID (SK...) and Secret — the secret is shown only once.

Python

client = Client(
    os.environ["TWILIO_API_KEY"],      # SK...
    os.environ["TWILIO_API_SECRET"],
    os.environ["TWILIO_ACCOUNT_SID"]   # required as third argument
)

Node.js

const client = require("twilio")(
    process.env.TWILIO_API_KEY,
    process.env.TWILIO_API_SECRET,
    { accountSid: process.env.TWILIO_ACCOUNT_SID }
);

Restricted API Keys

Restricted keys grant access only to specific Twilio API resources you define. Use them for least-privilege access in production.

Create via the v1 IAM API (not the v2010 /Keys.json endpoint — see CANNOT section):

Python

key = client.iam.v1.api_key.create(
    account_sid=os.environ["TWILIO_ACCOUNT_SID"],
    friendly_name="messaging-only-key",
    key_type="restricted",
    policy={
        "allow": [
            "/2010-04-01/Accounts/{AccountSid}/Messages*"
        ]
    }
)
# Store key.sid and key.secret securely — secret shown only once

Example permission patterns:

Permission Grants access to
/2010-04-01/Accounts/{AccountSid}/Messages* Send and read messages
/2010-04-01/Accounts/{AccountSid}/Calls* Make and manage calls
/v2/Services/*/Verifications* Verify API only

Docs: Restricted API keys

Test Credentials

Make API calls without charges or sending real messages. Find at Console > Account > API keys & tokens > Test credentials.

Python

client = Client(
    os.environ["TWILIO_TEST_ACCOUNT_SID"],
    os.environ["TWILIO_TEST_AUTH_TOKEN"]
)

Node.js

const client = require("twilio")(
    process.env.TWILIO_TEST_ACCOUNT_SID,
    process.env.TWILIO_TEST_AUTH_TOKEN
);

Magic test numbers:

  • +15005550006 — valid, can receive messages
  • +15005550001 — invalid number (triggers error 21211)
  • +15005550007 — number that cannot receive SMS (triggers error 21612)

Auth Token Rotation

Rotate your Auth Token if it's been exposed or as periodic security hygiene. Twilio uses a secondary token promotion model:

  1. Console > Account > API keys & tokens > Request a secondary Auth Token
  2. Update your application to use the secondary token
  3. Once confirmed working, promote the secondary to primary
  4. The old primary token is immediately invalidated

Python

# Promote secondary Auth Token to primary via API
from twilio.rest import Client

client = Client(os.environ["TWILIO_ACCOUNT_SID"], os.environ["TWILIO_AUTH_TOKEN"])
account = client.api.accounts(os.environ["TWILIO_ACCOUNT_SID"]).update(
    auth_token_promotion="promote"
)

Important: Auth Token rotation invalidates all active sessions using that token. Plan the switchover to minimize downtime.

Полный SKILL.md на GitHub

Установить twilio-iam-auth-setup в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

agents/openai.yaml

FAQ

Что делает скилл twilio-iam-auth-setup?

Set up and manage Twilio authentication credentials: Auth Tokens, API keys (Standard, Main, Restricted), Access Tokens for client-side SDKs, and credential rotation. Use this skill as a prerequisite foundation before making any Twilio API calls.

Как установить скилл twilio-iam-auth-setup?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл twilio-iam-auth-setup запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить twilio-iam-auth-setup с