What problem does it solve?
This skill prevents accidental authorization mismatches by helping you choose the correct VTEX IO authentication token for the requester behind a backend call (shopper, Admin user, or app context).
Core Features & Use Cases
- Token selection by requester context: Choose between
ctx.authToken, ctx.storeUserAuthToken, and ctx.adminUserAuthToken based on whether the request is app-scoped, storefront/shopper-driven, or Admin-driven.
- Identity-aware client wiring: Ensure VTEX clients and custom wrappers propagate the matching auth token (or explicitly set
authMethod) instead of defaulting silently.
- Guardrails against credential misuse: Avoid logging or returning raw tokens, avoid hardcoding
appKey/appToken, and keep Admin tokens server-side only.
Use case example: An Admin dashboard action that lists orders must respect the logged-in Admin user's License Manager role, so the integration should use ADMIN_TOKEN with ctx.adminUserAuthToken rather than defaulting to ctx.authToken.
Quick Start
Apply the vtex-io-auth-tokens-and-context skill to decide whether a given VTEX IO request should use STORE_TOKEN, ADMIN_TOKEN, or AUTH_TOKEN based on the current request path and IOContext fields.