Visitor Auth

Configure visitor auth

Enable email-based login for website visitors. Use method 'link' for magic link email or 'code' for 6-digit verification code. Visitors authenticate via the SAPI session flow.

post/sapi/project/{projectId}/auth/config

Request

  • Base URL: https://api.websitepublisher.ai
  • URL: https://api.websitepublisher.ai/sapi/project/{projectId}/auth/config
  • Auth: OAuth 2 (authorization code, authorization URL https://api.websitepublisher.ai/dapi/oauth/authorize, token URL https://api.websitepublisher.ai/dapi/oauth/token, scopes: read, write)

Path parameters

projectIdinteger required

Request body

enabledboolean

Enable or disable visitor auth (default: true)

methodsstring[]

Auth methods: link=magic link email, code=6-digit code

success_urlstring

Redirect URL after successful verification (e.g. /welkom)

session_ttl_verifiedinteger

Verified session duration in seconds (min 3600, max 2592000)

require_nameboolean

Ask visitor for name during auth (default: false)

allowed_domainsstring[] nullable

Email domain whitelist (e.g. ["bedrijf.nl"]). Null = all domains allowed.

Response

Visitor auth configured

Changes

No recorded changes to this operation across all 1 revision of this API.