Turnstile

Turnstile

Turnstile

Widgets

Turnstile.Widgets

Methods

list(, ): <>
get/accounts/{account_id}/challenges/widgets

Lists all turnstile widgets of an account.

get(, , ):
get/accounts/{account_id}/challenges/widgets/{sitekey}

Show a single challenge widget configuration.

create(, ):
post/accounts/{account_id}/challenges/widgets

Lists challenge widgets.

update(, , ):
put/accounts/{account_id}/challenges/widgets/{sitekey}

Update the configuration of a widget.

delete(, , ):
delete/accounts/{account_id}/challenges/widgets/{sitekey}

Destroy a Turnstile Widget.

rotateSecret(, , ):
post/accounts/{account_id}/challenges/widgets/{sitekey}/rotate_secret

Generate a new secret key for this widget. If invalidate_immediately is set to false, the previous secret remains valid for 2 hours.

Note that secrets cannot be rotated again during the grace period.

Domain types

Widget{…}

A Turnstile widget's detailed configuration

WidgetDomain = string

Hosts as a hostname or IPv4/IPv6 address represented by strings. The widget will only work on these domains, and their subdomains.