Create pages from visitors

When I try to create a page from a route or controller with $page->create([]) if I am not logged in it throws an error “You cannot…”

How to bypass this ?

You would need to use $kirby->impersonate('') either with a vaild user (email address) or you can use the kirby “superuser” $kirby->impersonate('kirby').

1 Like

Read the “Authentication for frontend stuff” section here:

1 Like

Perfect, thanks a lot !