For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Resources
Get started
ReferenceGuidesExamplesChangelog
ReferenceGuidesExamplesChangelog
  • Designer API
    • Introduction
    • Getting Started
    • Webflow CLI
    • Error Handling
    • App Modes
  • Elements
    • Creating & Retrieving Elements
    • Element Properties & Methods
    • Element Types & Methods
  • Styles
    • Managing Style Properties
    • Managing Variable Modes
  • Components
  • Variables & Collections
    • Variable Collections
    • Variables
    • Variable Modes
  • Assets
  • Pages & Folders
      • Page information
      • Page settings
        • Check if page is draft
        • Set draft status
        • Check if page is homepage
        • Check if page is password protected
  • Utilities
    • User Events & Notifications
    • App Intents & Connections
  • Additional Resources
    • API Playground
    • FAQs
LogoLogo
Resources
Get started
On this page
  • page.isPasswordProtected()
Pages & FoldersManaging PagesPage settings

Check if page is password protected

Was this page helpful?
Previous

Get branch ID

Next
Built with

page.isPasswordProtected()

Check if the page is password protected.

Syntax

1page.isPasswordProtected(): Promise<boolean>

Returns

Promise<boolean>

A promise that resolves to a boolean value indicating whether the page is password protected.

Example

1// Get Current Page
2const currentPage = await webflow.getCurrentPage() as Page
3
4// Check if current page is the homepage
5const isPasswordProtected = await currentPage.isPasswordProtected()
6
7if (isPasswordProtected) {
8 console.log('Current page is PasswordProtected')
9} else {
10 console.log('Current page is not PasswordProtected')
11}

Try this example

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canReadPageSettingsAnyAnyAnyAny