[System] You are a VTEX documentation expert. You provide accurate, detailed information about VTEX platform, APIs, apps, and Store Framework development.

[User] Explain the VTEX api reference card token vault api API and how to use it.

[Assistant]
Documentation

[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)

[GuidesLearn how to use our APIs and extend the VTEX platform.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/guides)

[API ReferenceExplore detailed information about our endpoints.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference)

[App DevelopmentLearn how to build cloud-based apps and integrations.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/app-development)

[Storefront DevelopmentExpress your brand identity creating unique storefronts.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/storefront-development)

[VTEX IO AppsFind pre-built solutions to grow your business.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/vtex-io-apps)

[TroubleshootingFind practical solutions to common development issues.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/troubleshooting)

[Release NotesStay up to date with our latest releases and bug fixes.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/updates/release-notes)

API Reference

Filter By

Post

Get

Put

Delete

Patch

[Anti-fraud Provider API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/antifraud-provider-protocol/)

---

[Audience API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/audience-api/)

---

[Buyer organizations](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/buyer-organizations/)

---

[Budgets API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/budgets-api/)

---

[Legacy CMS Portal API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/legacy-cms-portal-api/)

---

[Card Token Vault API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/card-token-vault-api/)

Card tokens operations

Card tokens import

---

[Catalog API - Seller Portal](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/catalog-api-seller-portal/)

---

[Catalog API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/catalog-api/)

---

[Checkout API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/checkout-api/)

---

[Customer Credit API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/customer-credit-api/)

---

[Delivery Promise Notification API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/delivery-promise-notification-api/)

---

[GiftCard API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/giftcard-api/)

---

[Giftcard Provider Protocol API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/giftcard-provider-protocol/)

---

[GiftCard Hub API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/giftcard-hub-api/)

---

[Headless CMS](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/headless-cms-api/)

---

[Intelligent Search API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/intelligent-search-api/)

---

[Intelligent Search Events API - Headless](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/intelligent-search-events-api-headless/)

---

[License Manager API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/license-manager-api/)

---

[Logistics API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/logistics-api/)

---

[Marketplace API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/marketplace-apis/)

---

[Marketplace Protocol](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/marketplace-protocol/)

---

[Master Data API - v2](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/master-data-api-v2/)

---

[Master Data API - v1](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/masterdata-api/)

---

[Message Center API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/message-center-api/)

---

[mTLS API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/mtls-api/)

---

[Operational Capacity API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/operational-capacity-api/)

---

[Orders API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/orders-api/)

---

[Organization Units API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/organization-units-api/)

---

[Payment Provider Protocol API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/payment-provider-protocol/)

---

[Payments Gateway API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/payments-gateway-api/)

---

[Pick and Pack API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/pick-and-pack-api/)

---

[Pick and Pack Last Mile Protocol API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/pick-and-pack-protocol-api/)

---

[Pick and Pack Order Changes API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/pick-and-pack-order-changes-api/)

---

[Policies System API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/policies-system-api/)

---

[Pricing API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/pricing-api/)

---

[Pricing Hub](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/pricing-hub/)

---

[Promotions & Taxes API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/promotions-and-taxes-api/)

---

[Promotions & Taxes API v2](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/promotions-and-taxes-api-v2/)

---

[Punchout API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/punchout-api/)

---

[Reviews and Ratings API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/reviews-and-ratings-api/)

---

[Recommendations BFF API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/recommendations-bff-api/)

---

[SKU Bindings API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/sku-bindings-api/)

---

[Search API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/search-api/)

---

[Session Manager API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/session-manager-api/)

---

[SSL Certificates API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/ssl-certificates-api/)

---

[Storefront Permissions API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/storefront-permissions-api/)

---

[Subscriptions API (v3)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/subscriptions-api-v3/)

---

[VTEX Ads API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/vtex-ads-api/)

---

[VTEX Shipping Network API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/vtex-shipping-network-api/)

---

[VTEX Tracking APIs](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/tracking/)

---

[VTEX DO API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/vtex-do-api/)

---

[VTEX ID](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/vtex-id-api/)

---

[Profile System (Data Protection Plus)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/profile-system/)

---

[Orders API - PII Data Architecture (Data Protection Plus)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/orders-api-pii-version/)

---

[Guides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/guides)

[API Reference](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference)

[App Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/app-development)

[Storefront Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/storefront-development)

[VTEX IO Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/vtex-io-apps)

[Troubleshooting](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/troubleshooting)

---

[Release Notes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/updates/release-notes)

API Reference

Filter By

Post

Get

Put

Delete

Patch

[Anti-fraud Provider API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/antifraud-provider-protocol/)

---

[Audience API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/audience-api/)

---

[Buyer organizations](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/buyer-organizations/)

---

[Budgets API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/budgets-api/)

---

[Legacy CMS Portal API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/legacy-cms-portal-api/)

---

[Card Token Vault API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/card-token-vault-api/)

Card tokens operations

Card tokens import

---

[Catalog API - Seller Portal](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/catalog-api-seller-portal/)

---

[Catalog API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/catalog-api/)

---

[Checkout API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/checkout-api/)

---

[Customer Credit API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/customer-credit-api/)

---

[Delivery Promise Notification API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/delivery-promise-notification-api/)

---

[GiftCard API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/giftcard-api/)

---

[Giftcard Provider Protocol API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/giftcard-provider-protocol/)

---

[GiftCard Hub API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/giftcard-hub-api/)

---

[Headless CMS](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/headless-cms-api/)

---

[Intelligent Search API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/intelligent-search-api/)

---

[Intelligent Search Events API - Headless](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/intelligent-search-events-api-headless/)

---

[License Manager API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/license-manager-api/)

---

[Logistics API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/logistics-api/)

---

[Marketplace API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/marketplace-apis/)

---

[Marketplace Protocol](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/marketplace-protocol/)

---

[Master Data API - v2](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/master-data-api-v2/)

---

[Master Data API - v1](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/masterdata-api/)

---

[Message Center API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/message-center-api/)

---

[mTLS API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/mtls-api/)

---

[Operational Capacity API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/operational-capacity-api/)

---

[Orders API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/orders-api/)

---

[Organization Units API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/organization-units-api/)

---

[Payment Provider Protocol API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/payment-provider-protocol/)

---

[Payments Gateway API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/payments-gateway-api/)

---

[Pick and Pack API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/pick-and-pack-api/)

---

[Pick and Pack Last Mile Protocol API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/pick-and-pack-protocol-api/)

---

[Pick and Pack Order Changes API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/pick-and-pack-order-changes-api/)

---

[Policies System API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/policies-system-api/)

---

[Pricing API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/pricing-api/)

---

[Pricing Hub](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/pricing-hub/)

---

[Promotions & Taxes API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/promotions-and-taxes-api/)

---

[Promotions & Taxes API v2](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/promotions-and-taxes-api-v2/)

---

[Punchout API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/punchout-api/)

---

[Reviews and Ratings API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/reviews-and-ratings-api/)

---

[Recommendations BFF API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/recommendations-bff-api/)

---

[SKU Bindings API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/sku-bindings-api/)

---

[Search API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/search-api/)

---

[Session Manager API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/session-manager-api/)

---

[SSL Certificates API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/ssl-certificates-api/)

---

[Storefront Permissions API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/storefront-permissions-api/)

---

[Subscriptions API (v3)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/subscriptions-api-v3/)

---

[VTEX Ads API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/vtex-ads-api/)

---

[VTEX Shipping Network API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/vtex-shipping-network-api/)

---

[VTEX Tracking APIs](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/tracking/)

---

[VTEX DO API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/vtex-do-api/)

---

[VTEX ID](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/vtex-id-api/)

---

[Profile System (Data Protection Plus)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/profile-system/)

---

[Orders API - PII Data Architecture (Data Protection Plus)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/orders-api-pii-version/)

---

[PuUpdate specific website comunication protocol« Previous](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/legacy-cms-portal-api%23put-/api/catalog%5Fsystem/pvt/virtualfolder/site/-websiteId-/changeurischema/-protocol-)[PoCreate card tokenNext »](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/card-token-vault-api/docs/api-reference/card-token-vault-api%23post-/api/card-token-vault/tokens)

[Github](https://read.calvincode.net/reader?url=https://github.com/vtex-apps)[Help Center](https://read.calvincode.net/reader?url=https://help.vtex.com/)[Community](https://read.calvincode.net/reader?url=https://community.vtex.com/?%5Fga=2.198523433.743584735.1647618303-1974737580.1645714642)[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)


[System] You are a VTEX documentation expert. You provide accurate, detailed information about VTEX platform, APIs, apps, and Store Framework development.

[User] Provide a guide on guides vtex io documentation publishing an app in VTEX.

[Assistant]
Documentation

[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)

[GuidesLearn how to use our APIs and extend the VTEX platform.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides)

[API ReferenceExplore detailed information about our endpoints.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/api-reference)

[App DevelopmentLearn how to build cloud-based apps and integrations.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/app-development)

[Storefront DevelopmentExpress your brand identity creating unique storefronts.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/storefront-development)

[VTEX IO AppsFind pre-built solutions to grow your business.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/vtex-io-apps)

[TroubleshootingFind practical solutions to common development issues.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/troubleshooting)

[Release NotesStay up to date with our latest releases and bug fixes.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/updates/release-notes)

App Development

[What is VTEX IO](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/vtex-io-documentation-what-is-vtex-io)

---

[What is a VTEX App](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/vtex-io-documentation-what-is-a-vtex-app)

---

[Governance and shared security in VTEX IO apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/governance-and-shared-security-in-vtex-io-apps)

---

[Code samples and templates](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/code-samples)

---

[Getting Started](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/vtex-io-getting-started)

---

Project structure

---

[VTEX IO CLI](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/vtex-io-documentation-vtex-io-cli-installation-and-command-reference)

---

[Workspace](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/vtex-io-documentation-workspace)

---

Managing apps

---

Development guides

---

[Node apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/app-development-guides)

---

[GraphQL in VTEX IO](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/graphql-in-vtex-io)

---

[Policies and permissions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/vtex-io-documentation-policies)

---

[A/B tests](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/ab-tests)

---

[Deployment](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/vtex-io-documentation-making-your-new-app-version-publicly-available)

[Releasing a new app version](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/vtex-io-documentation-releasing-a-new-app-version)

[Publishing an app](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/vtex-io-documentation-publishing-an-app)

[Deploying the app's stable version](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/vtex-io-documentation-deploying-the-app-stable-version)

[Promoting a workspace to Master](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/vtex-io-documentation-promoting-a-workspace-to-master)

---

[VTEX App Store](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/vtex-app-store)

---

[Edition Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/managing-edition-apps)

---

[Frequently asked questions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/vtex-io-documentation-frequently-asked-questions)

---

[Guides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides)

[API Reference](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/api-reference)

[App Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/app-development)

[Storefront Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/storefront-development)

[VTEX IO Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/vtex-io-apps)

[Troubleshooting](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/troubleshooting)

---

[Release Notes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/updates/release-notes)

App Development

[What is VTEX IO](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/vtex-io-documentation-what-is-vtex-io)

---

[What is a VTEX App](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/vtex-io-documentation-what-is-a-vtex-app)

---

[Governance and shared security in VTEX IO apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/governance-and-shared-security-in-vtex-io-apps)

---

[Code samples and templates](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/code-samples)

---

[Getting Started](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/vtex-io-getting-started)

---

Project structure

---

[VTEX IO CLI](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/vtex-io-documentation-vtex-io-cli-installation-and-command-reference)

---

[Workspace](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/vtex-io-documentation-workspace)

---

Managing apps

---

Development guides

---

[Node apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/app-development-guides)

---

[GraphQL in VTEX IO](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/graphql-in-vtex-io)

---

[Policies and permissions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/vtex-io-documentation-policies)

---

[A/B tests](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/ab-tests)

---

[Deployment](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/vtex-io-documentation-making-your-new-app-version-publicly-available)

[Releasing a new app version](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/vtex-io-documentation-releasing-a-new-app-version)

[Publishing an app](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/vtex-io-documentation-publishing-an-app)

[Deploying the app's stable version](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/vtex-io-documentation-deploying-the-app-stable-version)

[Promoting a workspace to Master](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/vtex-io-documentation-promoting-a-workspace-to-master)

---

[VTEX App Store](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/vtex-app-store)

---

[Edition Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/managing-edition-apps)

---

[Frequently asked questions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/vtex-io-documentation-frequently-asked-questions)

---

[App Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/app-development)

[Deployment](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/vtex-io-documentation-making-your-new-app-version-publicly-available)

[Publishing an app](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/vtex-io-documentation-publishing-an-app)

Publishing an app

After [releasing](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-releasing-a-new-app-version) an app version, you must publish your app so that you can install it in certain accounts to perform A/B tests and validate your changes. In other words, you must turn your app into a **candidate version**.

A candidate version of an app is a build distributed internally for **testing purposes only**. It's intended to check, before deployment, whether any critical problems have gone undetected earlier during development. Ideally, there shouldn't be many differences between your app's last candidate version and its final build.

## Before you begin

Before proceeding any further, make sure the app you are about to publish has already been [released](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-releasing-a-new-app-version).

Notice that publishing an app is one of the steps to **making your new app version publicly available**. Please refer to [this](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-making-your-new-app-version-publicly-available) guide for more information.

## Instructions

### Step 1 - Publishing a candidate version

Until now, your app version exists only in a local environment. To make it possible to install it in specific accounts and run tests, you must first turn it into a candidate version.

1. Open the terminal and log in to the account responsible for the app development, i.e., the account specified as the app's `vendor` in the [Manifest](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-manifest) file.
2. Change to your app's root folder.
3. Publish your app by running the following command:

`1

vtex publish

`

### Step 2 - Validating the candidate version

Before deploying your candidate version, you must install it in a new Production workspace and perform tests to check your app's behavior. Notice that production workspaces are ready to receive traffic and be accessed by other users.

1. Change to a new [Production workspace](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-creating-a-production-workspace):
* _Remember to replace the values between the curly brackets according to your scenario._

`1

vtex use {workspaceName} --production

`

1. Install the candidate version by indicating the new app's exact version:
* _Remember to replace the values between the curly brackets according to your scenario._

`1

vtex install {appvendor}.{appname}@{appversion}

`

1. Start an A/B test to test your candidate version. Please refer to [this](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing) guide for more information.

From this point onwards, you won't be able to link apps or make any code changes in your app's current version. Hence, if you need to make any modifications to your app, you will need to retreat and work on it in a development workspace.

> If you are developing a new Store Theme major, follow the steps in the [Migrating CMS settings after a theme major update](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-migrating-cms-settings-after-major-update) guide before proceeding any further. Otherwise, you may lose page templates set up via the Admin.

Contributors

1

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F60782333%3Fv%3D4%26w=64%26q=75)](https://github.com/carolinamenezes)

Was this helpful?

Yes

No

[Suggest Edits (GitHub)](https://read.calvincode.net/reader?url=https://github.com/vtexdocs/dev-portal-content/edit/main/docs/guides/vtex-io/App-Guides/vtex-io-documentation-making-your-new-app-version-publicly-available/vtex-io-documentation-publishing-an-app.md)

[Releasing a new app version« Previous](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app//docs/guides/vtex-io-documentation-releasing-a-new-app-version)[Deploying the app's stable versionNext »](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app//docs/guides/vtex-io-documentation-deploying-the-app-stable-version)

See also

[Deploying the app's stable versionApp Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/vtex-io-documentation-deploying-the-app-stable-version)

Contributors

1

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F60782333%3Fv%3D4%26w=64%26q=75)](https://github.com/carolinamenezes)

ON THIS PAGE

[Before you begin](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/vtex-io-documentation-publishing-an-app%23before-you-begin)

[Instructions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/vtex-io-documentation-publishing-an-app%23instructions)

[Step 1 - Publishing a candidate version](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/vtex-io-documentation-publishing-an-app%23step-1-publishing-a-candidate-version)[Step 2 - Validating the candidate version](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/vtex-io-documentation-publishing-an-app%23step-2-validating-the-candidate-version)

Was this helpful?

 Send feedback

[Suggest edits (GitHub)](https://read.calvincode.net/reader?url=https://github.com/vtexdocs/dev-portal-content/edit/main/docs/guides/vtex-io/App-Guides/vtex-io-documentation-making-your-new-app-version-publicly-available/vtex-io-documentation-publishing-an-app.md)

Copy page

On this page

ON THIS PAGE

[Before you begin](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/vtex-io-documentation-publishing-an-app%23before-you-begin)

[Instructions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/vtex-io-documentation-publishing-an-app%23instructions)

[Step 1 - Publishing a candidate version](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/vtex-io-documentation-publishing-an-app%23step-1-publishing-a-candidate-version)[Step 2 - Validating the candidate version](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app/docs/guides/vtex-io-documentation-publishing-an-app%23step-2-validating-the-candidate-version)

On this page

[Github](https://read.calvincode.net/reader?url=https://github.com/vtex-apps)[Help Center](https://read.calvincode.net/reader?url=https://help.vtex.com/)[Community](https://read.calvincode.net/reader?url=https://community.vtex.com/?%5Fga=2.198523433.743584735.1647618303-1974737580.1645714642)[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)


[System] You are a VTEX documentation expert. You provide accurate, detailed information about VTEX platform, APIs, apps, and Store Framework development.

[User] Provide a guide on guides checking which user is currently authenticated in VTEX.

[Assistant]
Documentation

[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)

[GuidesLearn how to use our APIs and extend the VTEX platform.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides)

[API ReferenceExplore detailed information about our endpoints.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/api-reference)

[App DevelopmentLearn how to build cloud-based apps and integrations.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/app-development)

[Storefront DevelopmentExpress your brand identity creating unique storefronts.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/storefront-development)

[VTEX IO AppsFind pre-built solutions to grow your business.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/vtex-io-apps)

[TroubleshootingFind practical solutions to common development issues.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/troubleshooting)

[Release NotesStay up to date with our latest releases and bug fixes.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/updates/release-notes)

Guides

[VTEX Platform Overview](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/vtex-platform-overview)

---

[API usage](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/api-usage)

[List of REST APIs](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/getting-started-list-of-rest-apis)

[Making your first request](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/making-your-first-request)

[Authentication](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/authentication)

[API authentication using API keys](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/api-authentication-using-api-keys)

[Rotating VTEX API tokens](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/rotating-vtex-api-tokens)

[App authentication using auth tokens](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/app-authentication-using-auth-tokens)

[API authentication using user tokens](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/api-authentication-using-user-tokens)

[Checking which user is currently authenticated](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/checking-which-user-is-currently-authenticated)

[Expiring a shopper's password](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/expiring-a-shoppers-password)

[Refresh token flow for headless implementations](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/refresh-token-flow-for-headless-implementations)

[Response status codes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/api-response-codes)

Error handling and best practices

---

[Getting started](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/getting-started)

---

Integration Guides

---

[Catalog](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/catalog-integration)

---

[Checkout](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/checkout-api-overview)

---

[Master Data](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/master-data)

---

Payments

---

Orders

---

Logistics

---

B2B Suite

---

VTEX Sales App

---

UI Customization

---

Message Center

---

Pricing

---

Promotions

---

Infrastructure

---

Search

---

Storefront Permissions

---

[VTEX Activity Flow](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/activity-flow)

---

[VTEX Ads](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/vtex-ads)

---

VTEX Session

---

VTEX Shield

---

[Data Protection Plus](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/data-protection-plus)

---

Weni by VTEX

---

[Guides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides)

[API Reference](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/api-reference)

[App Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/app-development)

[Storefront Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/storefront-development)

[VTEX IO Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/vtex-io-apps)

[Troubleshooting](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/troubleshooting)

---

[Release Notes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/updates/release-notes)

Guides

[VTEX Platform Overview](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/vtex-platform-overview)

---

[API usage](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/api-usage)

[List of REST APIs](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/getting-started-list-of-rest-apis)

[Making your first request](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/making-your-first-request)

[Authentication](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/authentication)

[API authentication using API keys](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/api-authentication-using-api-keys)

[Rotating VTEX API tokens](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/rotating-vtex-api-tokens)

[App authentication using auth tokens](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/app-authentication-using-auth-tokens)

[API authentication using user tokens](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/api-authentication-using-user-tokens)

[Checking which user is currently authenticated](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/checking-which-user-is-currently-authenticated)

[Expiring a shopper's password](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/expiring-a-shoppers-password)

[Refresh token flow for headless implementations](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/refresh-token-flow-for-headless-implementations)

[Response status codes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/api-response-codes)

Error handling and best practices

---

[Getting started](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/getting-started)

---

Integration Guides

---

[Catalog](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/catalog-integration)

---

[Checkout](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/checkout-api-overview)

---

[Master Data](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/master-data)

---

Payments

---

Orders

---

Logistics

---

B2B Suite

---

VTEX Sales App

---

UI Customization

---

Message Center

---

Pricing

---

Promotions

---

Infrastructure

---

Search

---

Storefront Permissions

---

[VTEX Activity Flow](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/activity-flow)

---

[VTEX Ads](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/vtex-ads)

---

VTEX Session

---

VTEX Shield

---

[Data Protection Plus](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/data-protection-plus)

---

Weni by VTEX

---

[Guides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides)

[API usage](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/api-usage)

[Authentication](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/authentication)

[Checking which user is currently authenticated](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/checking-which-user-is-currently-authenticated)

Checking authenticated users via authorization cookies

Learn how to check which user is currently authenticated in your store using their authentication token and VTEX APIs.

In this guide, you will learn how to verify if a user is currently authenticated in your store using their authentication token stored in cookies. Additionally, you will learn how to retrieve identifying information, such as their user ID and email, using VTEX's API.

## Authentication cookies overview

When a user logs into your store, cookies are created to store the authorization token. From that point onward, these cookies are automatically included in all requests to VTEX servers, enabling the system to identify the user performing the action.

In situations other than API requests to VTEX, you may need to check whether the user is logged in or retrieve identifying information, such as their email or user ID. These actions can also be accomplished using the authentication cookies.

> Note that these cookies have the `HTTP Only` and `Secure` options enabled. This means they cannot be accessed via JavaScript and will only be sent over secure HTTPS requests.

## Instructions

### Sending the request to verify user authentication

To check the authenticated user, send a request to the indicated API endpoint, replacing `VtexIdclientAutCookie` with the user's authorization token.

### Analyzing the API response

#### Authenticated user

If the user is authenticated, the API will return a JSON object with the following structure:

* `userId`: The unique user ID within VTEX services.
* `user`: The user's email address.
* `userType`: Internal VTEX user type identifier (for VTEX use only).

#### Non-authenticated user

If the user is not authenticated, the response body will be empty (`null`), and the HTTP status will be either `200 (OK)` or `401 (Unauthorized)`.

Request

`1

GET

2

https://{accountName}.{environment}.com.br/api/vtexid/pub/authenticated/user?authToken={VtexIdclientAutCookie}

`

200-Response

`1

{

2

 "userId": "88888888-8888-8888-8888-888888888888",

3

 "user": "user@mail.com",

4

 "userType": "F"

5

}

`

Contributors

3

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F60782333%3Fv%3D4%26w=64%26q=75)](https://github.com/carolinamenezes)

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F77292838%3Fv%3D4%26w=64%26q=75)](https://github.com/julia-rabello)

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F47991446%3Fv%3D4%26w=64%26q=75)](https://github.com/PedroAntunesCosta)

Was this helpful?

Yes

No

[Suggest Edits (GitHub)](https://read.calvincode.net/reader?url=https://github.com/vtexdocs/dev-portal-content/edit/main/docs/guides/Getting-Started/authentication/checking-which-user-is-currently-authenticated.md)

[API authentication using user tokens« Previous](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated//docs/guides/api-authentication-using-user-tokens)[Expiring a shopper's passwordNext »](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated//docs/guides/expiring-a-shoppers-password)

See also

[API authentication using user tokensGuides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/api-authentication-using-user-tokens)

Contributors

3

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F60782333%3Fv%3D4%26w=64%26q=75)](https://github.com/carolinamenezes)

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F77292838%3Fv%3D4%26w=64%26q=75)](https://github.com/julia-rabello)

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F47991446%3Fv%3D4%26w=64%26q=75)](https://github.com/PedroAntunesCosta)

ON THIS PAGE

[Authentication cookies overview](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/checking-which-user-is-currently-authenticated%23authentication-cookies-overview)

[Instructions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/checking-which-user-is-currently-authenticated%23instructions)

[Sending the request to verify user authentication](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/checking-which-user-is-currently-authenticated%23sending-the-request-to-verify-user-authentication)[Analyzing the API response](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/checking-which-user-is-currently-authenticated%23analyzing-the-api-response)

Was this helpful?

 Send feedback

[Suggest edits (GitHub)](https://read.calvincode.net/reader?url=https://github.com/vtexdocs/dev-portal-content/edit/main/docs/guides/Getting-Started/authentication/checking-which-user-is-currently-authenticated.md)

Copy page

On this page

ON THIS PAGE

[Authentication cookies overview](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/checking-which-user-is-currently-authenticated%23authentication-cookies-overview)

[Instructions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/checking-which-user-is-currently-authenticated%23instructions)

[Sending the request to verify user authentication](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/checking-which-user-is-currently-authenticated%23sending-the-request-to-verify-user-authentication)[Analyzing the API response](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/checking-which-user-is-currently-authenticated/docs/guides/checking-which-user-is-currently-authenticated%23analyzing-the-api-response)

On this page

[Github](https://read.calvincode.net/reader?url=https://github.com/vtex-apps)[Help Center](https://read.calvincode.net/reader?url=https://help.vtex.com/)[Community](https://read.calvincode.net/reader?url=https://community.vtex.com/?%5Fga=2.198523433.743584735.1647618303-1974737580.1645714642)[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)


[System] You are a VTEX documentation expert. You provide accurate, detailed information about VTEX platform, APIs, apps, and Store Framework development.

[User] Provide a guide on guides managing application logs in VTEX.

[Assistant]
Documentation

[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)

[GuidesLearn how to use our APIs and extend the VTEX platform.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides)

[API ReferenceExplore detailed information about our endpoints.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/api-reference)

[App DevelopmentLearn how to build cloud-based apps and integrations.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/app-development)

[Storefront DevelopmentExpress your brand identity creating unique storefronts.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/storefront-development)

[VTEX IO AppsFind pre-built solutions to grow your business.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/vtex-io-apps)

[TroubleshootingFind practical solutions to common development issues.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/troubleshooting)

[Release NotesStay up to date with our latest releases and bug fixes.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/updates/release-notes)

App Development

[What is VTEX IO](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/vtex-io-documentation-what-is-vtex-io)

---

[What is a VTEX App](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/vtex-io-documentation-what-is-a-vtex-app)

---

[Governance and shared security in VTEX IO apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/governance-and-shared-security-in-vtex-io-apps)

---

[Code samples and templates](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/code-samples)

---

[Getting Started](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/vtex-io-getting-started)

---

Project structure

---

[VTEX IO CLI](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/vtex-io-documentation-vtex-io-cli-installation-and-command-reference)

---

[Workspace](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/vtex-io-documentation-workspace)

---

Managing apps

---

Development guides

[Managing application logs](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/vtex-io-documentation-managing-application-logs)

[Running IO scripts in non-IO VTEX stores](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/vtex-io-documentation-running-io-scripts-in-non-io-vtex-stores)

[Creating an interface for your app settings](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/vtex-io-documentation-creating-an-interface-for-your-app-settings)

---

[Node apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/app-development-guides)

---

[GraphQL in VTEX IO](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/graphql-in-vtex-io)

---

[Policies and permissions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/vtex-io-documentation-policies)

---

[A/B tests](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/ab-tests)

---

[Deployment](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/vtex-io-documentation-making-your-new-app-version-publicly-available)

---

[VTEX App Store](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/vtex-app-store)

---

[Edition Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/managing-edition-apps)

---

[Frequently asked questions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/vtex-io-documentation-frequently-asked-questions)

---

[Guides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides)

[API Reference](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/api-reference)

[App Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/app-development)

[Storefront Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/storefront-development)

[VTEX IO Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/vtex-io-apps)

[Troubleshooting](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/troubleshooting)

---

[Release Notes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/updates/release-notes)

App Development

[What is VTEX IO](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/vtex-io-documentation-what-is-vtex-io)

---

[What is a VTEX App](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/vtex-io-documentation-what-is-a-vtex-app)

---

[Governance and shared security in VTEX IO apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/governance-and-shared-security-in-vtex-io-apps)

---

[Code samples and templates](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/code-samples)

---

[Getting Started](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/vtex-io-getting-started)

---

Project structure

---

[VTEX IO CLI](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/vtex-io-documentation-vtex-io-cli-installation-and-command-reference)

---

[Workspace](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/vtex-io-documentation-workspace)

---

Managing apps

---

Development guides

[Managing application logs](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/vtex-io-documentation-managing-application-logs)

[Running IO scripts in non-IO VTEX stores](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/vtex-io-documentation-running-io-scripts-in-non-io-vtex-stores)

[Creating an interface for your app settings](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/vtex-io-documentation-creating-an-interface-for-your-app-settings)

---

[Node apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/app-development-guides)

---

[GraphQL in VTEX IO](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/graphql-in-vtex-io)

---

[Policies and permissions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/vtex-io-documentation-policies)

---

[A/B tests](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/ab-tests)

---

[Deployment](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/vtex-io-documentation-making-your-new-app-version-publicly-available)

---

[VTEX App Store](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/vtex-app-store)

---

[Edition Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/managing-edition-apps)

---

[Frequently asked questions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/vtex-io-documentation-frequently-asked-questions)

---

[App Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/app-development)

Development guides

[Managing application logs](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/vtex-io-documentation-managing-application-logs)

Managing application logs

VTEX IO provides a logging service that allows developers to keep track of app errors, warnings, and informative events. The VTEX IO Logging Service collects data from the cloud infrastructure where VTEX applications run and delivers them via the VTEX IO CLI.

In the following section, you'll learn how to implement the VTEX IO Logging Service in your apps and how to retrieve their respective logs.

> The VTEX IO Logging Service is currently available for Node apps only.

---

## Before you begin

To follow this guide, you must have the VTEX IO CLI installed on your machine. For more information, please see [this document](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-install).

---

## Instructions

### Implementing the VTEX IO Logging Service

1. Open your Node app in the code editor of your choice.
2. Define an object with the `Context` interface as a parameter in a function where you want to provide logging messages. See the following example:

`1

const helloWorld = (ctx: Context) => {

2

 const { vtex: { logger } } = ctx

3

4

 logger.info('Hello World!')

5

}

`

In this example, the `helloWorld` function receives an object with a [**Context**](https://read.calvincode.net/reader?url=https://github.com/vtex/node-vtex-api/blob/master/src/service/worker/runtime/typings.ts%23L34) interface as a parameter.

> The `Context` interface contains many implementations inherent to the VTEX IO platform. One of those implementations is called `vtex` — an object containing all [VTEX IO infrastructure](https://read.calvincode.net/reader?url=https://github.com/vtex/node-vtex-api/blob/master/src/service/worker/runtime/typings.ts%23L116) related metadata, such as `account`, `workspace`, `tenant`, `settings`, and some service implementations. In the previous example, we used the `logger` service, an implementation inside `vtex` that generates log messages.

1. [Destructure](https://read.calvincode.net/reader?url=https://www.typescriptlang.org/docs/handbook/variable-declarations.html%23destructuring) the `logger` object from the `vtex` context and use its methods (`error`, `warn`, `info`, and `debug`) to provide error, warning, debugging, or informative messages in the log. See the following example:

`1

const helloWorld = (ctx: Context) => {

2

 const { vtex: { logger } } = ctx

3

4

 logger.warn('Warning the world!')

5

6

 logger.error('Error!!!')

7

8

 logger.debug('Verbose debug message!')

9

}

`

> Every exception that happens in a VTEX IO service app is intercepted and automatically logged with a `logger.error` implementation.

### Retrieving app logs

Every log written by a running app with the VTEX IO Logging Service is collected and stored for later retrieval.

You can retrieve the logs using the [VTEX IO CLI](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-installation-and-command-reference) by following the steps:

1. Log in to your VTEX account.
2. Install the Logs plugin for the VTEX IO CLI by running the following command:

`1

vtex plugins add logs

`

1. Check if the installation of the Logs plugin was successful by running `vtex logs --help`.
2. Retrieve logs from all apps installed in your account by running the following command:

`1

vtex logs --all

`

The output should be a message similar to the following:

`1

vtex logs --all

2

18:15:26.779 - info: Connecting to logs stream for store components

3

18:15:26.782 - info: Press CTRL+C to abort

4

5

18:15:43.856 - info: Listening to store components logs

6

7

 info: { status: 403,

8

 code: 'FORBIDDEN',

9

 name: 'ForbiddenError',

10

 level: 'error',

11

 message: 'This username is already registered with another email',

12

 stack:

13

 'ForbiddenError: This username is already registered with another email[ErrorStack...]

14

 routeId: 'login' }

`

> You can also retrieve logs from a specific app installed in your account by running the following command: `vtex logs {serviceAppExample}`. Replace `serviceAppExample` with the desired app name.

We suggest running `vtex logs --all > {mylogfile.logs}` to save the log messages in a local file. Replace `{mylogfile.logs}` with a name that fits your environment.

If you want to see log messages that you have previously retrieved, run `vtex logs --past`.

## Log storage and retention limits

VTEX limits the storage size and retention period of logs to guarantee the stability and performance of the platform. The limits are:

* Logs are stored for 7 days at most.
* Each app can have up to 1 GB of logs stored per account. If an app generates more than 1 GB of logs in one account in 7 days or less, the oldest logs are deleted.

If you need more than 1 GB of logs per week for an app, we recommend retrieving and storing your logs before they reach the storage limit. You can check the size of the logs from the size of the retrieved files in your local environment. See the instructions in the [Retrieving app logs](#retrieving-app-logs) section.

> VTEX may change the storage limits of app logs without additional notice. Check this documentation for the updated limit values.

Contributors

2

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F7026595%3Fv%3D4%26w=64%26q=75)](https://github.com/henriquessb)

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F60782333%3Fv%3D4%26w=64%26q=75)](https://github.com/carolinamenezes)

Was this helpful?

Yes

No

[Suggest Edits (GitHub)](https://read.calvincode.net/reader?url=https://github.com/vtexdocs/dev-portal-content/edit/main/docs/guides/vtex-io/App-Guides/configuring-workspaces/vtex-io-documentation-managing-application-logs.md)

[Deprecating an app« Previous](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs//docs/guides/vtex-io-documentation-deprecating-an-app)[Running IO scripts in non-IO VTEX storesNext »](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs//docs/guides/vtex-io-documentation-running-io-scripts-in-non-io-vtex-stores)

Contributors

2

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F7026595%3Fv%3D4%26w=64%26q=75)](https://github.com/henriquessb)

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F60782333%3Fv%3D4%26w=64%26q=75)](https://github.com/carolinamenezes)

ON THIS PAGE

[Before you begin](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/vtex-io-documentation-managing-application-logs%23before-you-begin)

[Instructions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/vtex-io-documentation-managing-application-logs%23instructions)

[Implementing the VTEX IO Logging Service](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/vtex-io-documentation-managing-application-logs%23implementing-the-vtex-io-logging-service)[Retrieving app logs](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/vtex-io-documentation-managing-application-logs%23retrieving-app-logs)

[Log storage and retention limits](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/vtex-io-documentation-managing-application-logs%23log-storage-and-retention-limits)

Was this helpful?

 Send feedback

[Suggest edits (GitHub)](https://read.calvincode.net/reader?url=https://github.com/vtexdocs/dev-portal-content/edit/main/docs/guides/vtex-io/App-Guides/configuring-workspaces/vtex-io-documentation-managing-application-logs.md)

Copy page

On this page

ON THIS PAGE

[Before you begin](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/vtex-io-documentation-managing-application-logs%23before-you-begin)

[Instructions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/vtex-io-documentation-managing-application-logs%23instructions)

[Implementing the VTEX IO Logging Service](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/vtex-io-documentation-managing-application-logs%23implementing-the-vtex-io-logging-service)[Retrieving app logs](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/vtex-io-documentation-managing-application-logs%23retrieving-app-logs)

[Log storage and retention limits](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/managing-application-logs/docs/guides/vtex-io-documentation-managing-application-logs%23log-storage-and-retention-limits)

On this page

[Github](https://read.calvincode.net/reader?url=https://github.com/vtex-apps)[Help Center](https://read.calvincode.net/reader?url=https://help.vtex.com/)[Community](https://read.calvincode.net/reader?url=https://community.vtex.com/?%5Fga=2.198523433.743584735.1647618303-1974737580.1645714642)[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)


[System] You are a VTEX documentation expert. You provide accurate, detailed information about VTEX platform, APIs, apps, and Store Framework development.

[User] How do I use the VTEX google tag manager app? Provide documentation and configuration details.

[Assistant]
Documentation

[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)

[GuidesLearn how to use our APIs and extend the VTEX platform.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/guides)

[API ReferenceExplore detailed information about our endpoints.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/api-reference)

[App DevelopmentLearn how to build cloud-based apps and integrations.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/app-development)

[Storefront DevelopmentExpress your brand identity creating unique storefronts.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/storefront-development)

[VTEX IO AppsFind pre-built solutions to grow your business.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/vtex-io-apps)

[TroubleshootingFind practical solutions to common development issues.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/troubleshooting)

[Release NotesStay up to date with our latest releases and bug fixes.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/updates/release-notes)

VTEX IO Apps

[Basic components](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/guides/basic-components)

---

[Store Components](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/guides/store-components)

---

[Advanced components](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/guides/advanced-components)

---

[B2B components](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/guides/b2b-components)

---

[B2B Suite](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/apps/vtex.b2b-suite)

---

[Functional Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/guides/functional-apps)

---

[Layout Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/guides/layout-apps)

---

[Pixel Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/guides/pixel-apps)

---

[My Account - StoreV2 version](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/apps/vtex.my-account)

---

[VTEX IO deprecated apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/guides/vtex-io-deprecated-apps)

---

[Guides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/guides)

[API Reference](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/api-reference)

[App Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/app-development)

[Storefront Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/storefront-development)

[VTEX IO Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/vtex-io-apps)

[Troubleshooting](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/troubleshooting)

---

[Release Notes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/updates/release-notes)

VTEX IO Apps

[Basic components](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/guides/basic-components)

---

[Store Components](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/guides/store-components)

---

[Advanced components](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/guides/advanced-components)

---

[B2B components](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/guides/b2b-components)

---

[B2B Suite](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/apps/vtex.b2b-suite)

---

[Functional Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/guides/functional-apps)

---

[Layout Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/guides/layout-apps)

---

[Pixel Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/guides/pixel-apps)

---

[My Account - StoreV2 version](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/apps/vtex.my-account)

---

[VTEX IO deprecated apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/guides/vtex-io-deprecated-apps)

---

[VTEX IO Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/vtex-io-apps)

Google Tag Manager

Official extension

Version: 3.5.4

Latest version: 3.5.4

[![{"base64":"  ","img":{"width":110,"height":20,"type":"svg","mime":"image/svg+xml","wUnits":"px","hUnits":"px","url":"https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square"}}](https://read.calvincode.net/reader?url=https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square)](#contributors-)

The VTEX Google Tag Manager (GTM) app is a first party integration to the [Google Tag Manager solution](https://read.calvincode.net/reader?url=https://tagmanager.google.com).

![{"base64":"  ","img":{"width":2874,"height":1552,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":336025,"url":"https://user-images.githubusercontent.com/52087100/84321347-55e11c80-ab49-11ea-9445-24eec6a07785.png"}}](https://read.calvincode.net/reader?url=https://user-images.githubusercontent.com/52087100/84321347-55e11c80-ab49-11ea-9445-24eec6a07785.png)

## Installing the Google Tag Manager app

1. Access the **Apps** section in your account's admin page and look for the Google Tag Manager box;
2. Then, click on the **Install** button;
3. You'll see a warning message about needing to enter the necessary configurations. Scroll down and type in your **GTM ID** in the `Google Tag Manager` field.
4. Click on **Save**.

> Access the [Google Tag Manager page](https://read.calvincode.net/reader?url=https://tagmanager.google.com/) and log in to your account in order to find out what is your account **GTM ID**. Use the number provided by the `Container ID` column.

### Step 2 - Creating Google Analytics variables

To set up Google Tag Manager in your store, you must create and set up all necessary variables, triggers, and tags. Follow the [Setting up Google Tag Manager documentation](https://read.calvincode.net/reader?url=https://developers.vtex.com/vtex-developer-docs/docs/vtex-io-documentation-setting-up-google-tag-manager) to create them.

### Step 3 - Persisting campaign data throughout a user session

To prevent GTM from creating additional session identifiers every time a user navigates the website, you must add the variables `originalLocation` and `originalReferrer` to your GTM container and configure your store’s Google Analytics tags. Notice that this is important to persist campaign data throughout a user session and avoid providing inconsistent campaign data to Google Analytics (GA).

> The `originalLocation` and `originalReferrer` variables are available for VTEX IO Google Tag Manager versions `2.x` and `3.x`.

#### Creating the variables Original Location and Original Referrer

1. Log in to your [GTM account](https://read.calvincode.net/reader?url=https://tagmanager.google.com) and click on the GTM container you want to work with.
![{"base64":"  ","img":{"width":1821,"height":508,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":69245,"url":"https://user-images.githubusercontent.com/67270558/136798596-cc0add2d-e110-4176-bc8d-665ded39da29.png"}}](https://read.calvincode.net/reader?url=https://user-images.githubusercontent.com/67270558/136798596-cc0add2d-e110-4176-bc8d-665ded39da29.png)
2. On the container page, click on **Variables**.
3. In the **Built-In Variables** section, check if the `Page URL` and `Page Path` variables are enabled. Otherwise, click on `Configure` and select `Page URL` and `Page Path` to enable them.
4. Go to the **User-Defined Variables** section and click on `New`. A side popup will open.
5. Replace the `Untitled Variable` value with `Original Location`.
6. Click on **Variable Configuration**.
7. On **Page Variables**, click on **Data Layer Variable**.
8. In the `Data Layer Variable Name` field, type `originalLocation`.
9. Enable the `Set Default Value` option and fill in the `Default Value` field with the following value:
`1
{{Page URL}}
`
![{"base64":"  ","img":{"width":774,"height":346,"type":"gif","mime":"image/gif","wUnits":"px","hUnits":"px","length":703078,"url":"https://user-images.githubusercontent.com/67270558/139482165-21f93c6a-48e5-421a-8e06-c942bda01974.gif"}}](https://read.calvincode.net/reader?url=https://user-images.githubusercontent.com/67270558/139482165-21f93c6a-48e5-421a-8e06-c942bda01974.gif)
10. Click `Save`. Once you have saved the `originalLocation` variable, create the `originalReferrer` as described in the steps below.
11. In the **User-Defined Variables** section, click on `New`. A side popup will open.
12. Replace the `Untitled Variable` value with `Original Referrer`.
13. Click on **Variable Configuration**.
14. On **Page Variables**, click on **Data Layer Variable**.
15. In the `Data Layer Variable Name` field, type `originalReferrer`.
16. Enable the `Set Default Value` option and fill in the `Default Value` field with the following value:
`1
{{Referrer}}
`
![{"base64":"  ","img":{"width":1878,"height":851,"type":"gif","mime":"image/gif","wUnits":"px","hUnits":"px","length":2028565,"url":"https://user-images.githubusercontent.com/67270558/141315033-56e6e498-8c44-490d-a6dd-51f226dd6fc9.gif"}}](https://read.calvincode.net/reader?url=https://user-images.githubusercontent.com/67270558/141315033-56e6e498-8c44-490d-a6dd-51f226dd6fc9.gif)
17. Click `Save`.

#### Updating Google Analytics Settings variables and tags

Now, let's configure every Google Analytics Settings variable that fires the `originalLocation` and `originalReferrer` variables.

1. Go to the **Variables** section;
2. On **User-Defined Variables**, click on the name of one of the Google Analytics Settings variables
![{"base64":"  ","img":{"width":1887,"height":795,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":66534,"url":"https://user-images.githubusercontent.com/67270558/136799579-f1bb7e68-ec4c-4deb-beb2-0dfedb88de10.png"}}](https://read.calvincode.net/reader?url=https://user-images.githubusercontent.com/67270558/136799579-f1bb7e68-ec4c-4deb-beb2-0dfedb88de10.png)
3. Click on the **Variable Configuration** box;
4. Go to **More Settings > Fields to Set**;
5. Click on `Add Field`;
6. Set the `Field Name` field as `location` and `Value` as `{{Original Location}}`;
7. Then, click on `Add Field` again;
8. Set the `Field Name` field as `referrer` and `Value` as `{{Original Referrer}}`;
9. Click on `Save`.

If you have any Google Analytics tags using the Google Analytics Settings variables you have changed, apply the same changes above directly on the tags that need it.

#### Publishing your changes

Once you have set up the Google Analytics variables and tags, follow Google's official guide on [how to submit and publish your store’s container](https://read.calvincode.net/reader?url=https://support.google.com/tagmanager/answer/6107163).

## Restrictions

In order to avoid performance problems and unforeseen behavior, our VTEX IO Google Tag Manager solution uses the native GTM **blacklist** feature. You can read more about this feature on the [Google Developer Guide](https://read.calvincode.net/reader?url=https://developers.google.com/tag-manager/web/restrict).

We, by default, blacklist the `html` ID, which automatically blocklists all the tags, variables, and triggers of the type `customScripts`. The main consequence of this blocklist is that **Custom HTML tags will not be triggered**.

> The HTML blacklist is the VTEX Google Tag Manager app's default. If you want to disable this restriction, go to `https://{accountName}.myvtex.com/admin/apps/vtex.google-tag-manager@2.x/setup` and check the toggle below.

![](https://user-images.githubusercontent.com/11340665/103930428-7c762e80-50fd-11eb-9cab-bc9e542b4dbf.png)

Most of the widely used Custom HTML tags are integrations with third-party services, like Customer Chat, Analytics, Remarketing, and Pixel tags. If your store needs a Custom HTML for one of those cases, the integration can either be done by transforming the tags into a [VTEX IO Pixel App](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/pixel-apps) or by removing this restriction.

Check below the full list of tags and variables that are blocked, by default, in the VTEX IO Google Tag Manager solution.

### Blocked tags

* Custom HTML Tag - `html`
* Eulerian Analytics Tag - `ela`
* SaleCycle JavaScript Tag - `scjs`
* Upsellit Global Footer Tag - `uslt`
* Upsellit Confirmation Tag - `uspt`

### Blocked variables

* Custom JavaScript Variable - `jsm`

Check out a list with all the GTM available tags on the [Google Developer Guide](https://read.calvincode.net/reader?url=https://developers.google.com/tag-manager/devguide).

See also

[VTEX App StoreVTEX IO Apps](https://read.calvincode.net/reader?url=https://apps.vtex.com/)

ON THIS PAGE

[Installing the Google Tag Manager app](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/apps/vtex.google-tag-manager%23installing-the-google-tag-manager-app)

[Step 2 - Creating Google Analytics variables](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/apps/vtex.google-tag-manager%23step-2-creating-google-analytics-variables)[Step 3 - Persisting campaign data throughout a user session](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/apps/vtex.google-tag-manager%23step-3-persisting-campaign-data-throughout-a-user-session)

[Restrictions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/apps/vtex.google-tag-manager%23restrictions)

[Blocked tags](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/apps/vtex.google-tag-manager%23blocked-tags)[Blocked variables](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.google-tag-manager/docs/apps/vtex.google-tag-manager%23blocked-variables)

Was this helpful?

[Github](https://read.calvincode.net/reader?url=https://github.com/vtex-apps)[Help Center](https://read.calvincode.net/reader?url=https://help.vtex.com/)[Community](https://read.calvincode.net/reader?url=https://community.vtex.com/?%5Fga=2.198523433.743584735.1647618303-1974737580.1645714642)[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)