Create Registration Flow for Browsers

GET {{baseUrl}}/self-service/registration/browser?return_to=<string>&login_challenge=<string>&after_verification_return_to=<string>&organization=<string>

This endpoint initializes a browser-based user registration flow. This endpoint will set the appropriate cookies and anti-CSRF measures required for browser-based flows.

If this endpoint is opened as a link in the browser, it will be redirected to selfservice.flows.registration.ui_url with the flow ID set as the query parameter ?flow=. If a valid user session exists already, the browser will be redirected to urls.default_redirect_url.

If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the case of an error, the error.id of the JSON response body can be one of:

session_already_available: The user is already signed in. security_csrf_violation: Unable to fetch the flow because a CSRF violation occurred. security_identity_mismatch: The requested ?return_to address is not allowed to be used. Adjust this in the configuration!

If this endpoint is called via an AJAX request, the response contains the registration flow without a redirect.

This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed.

More information can be found at Ory Kratos User Login and User Registration Documentation.

Request Params

KeyDatatypeRequiredDescription
return_tostringThe URL to return the browser to after the flow was completed.
login_challengestringOry OAuth 2.0 Login Challenge.

If set will cooperate with Ory OAuth2 and OpenID to act as an OAuth2 server / OpenID Provider.

The value for this parameter comes from login_challenge URL Query parameter sent to your application (e.g. /registration?login_challenge=abcde).

This feature is compatible with Ory Hydra when not running on the Ory Network. | | after_verification_return_to | string | | The URL to return the browser to after the verification flow was completed.

After the registration flow is completed, the user will be sent a verification email. Upon completing the verification flow, this URL will be used to override the default selfservice.flows.verification.after.default_redirect_to value. | | organization | string | | |

HEADERS

KeyDatatypeRequiredDescription
Acceptstring

RESPONSES

status: OK

{&quot;id&quot;:&quot;\u003cuuid\u003e&quot;,&quot;type&quot;:&quot;\u003cstring\u003e&quot;,&quot;expires_at&quot;:&quot;\u003cdateTime\u003e&quot;,&quot;issued_at&quot;:&quot;\u003cdateTime\u003e&quot;,&quot;request_url&quot;:&quot;\u003cstring\u003e&quot;,&quot;ui&quot;:{&quot;action&quot;:&quot;\u003cstring\u003e&quot;,&quot;method&quot;:&quot;\u003cstring\u003e&quot;,&quot;nodes&quot;:[{&quot;type&quot;:&quot;img&quot;,&quot;group&quot;:&quot;link&quot;,&quot;attributes&quot;:{&quot;name&quot;:&quot;\u003cstring\u003e&quot;,&quot;type&quot;:&quot;submit&quot;,&quot;disabled&quot;:&quot;\u003cboolean\u003e&quot;,&quot;node_type&quot;:&quot;img&quot;,&quot;autocomplete&quot;:&quot;new-password&quot;,&quot;label&quot;:{&quot;id&quot;:&quot;\u003clong\u003e&quot;,&quot;text&quot;:&quot;\u003cstring\u003e&quot;,&quot;type&quot;:&quot;info&quot;,&quot;context&quot;:{}},&quot;onclick&quot;:&quot;\u003cstring\u003e&quot;,&quot;onload&quot;:&quot;\u003cstring\u003e&quot;,&quot;pattern&quot;:&quot;\u003cstring\u003e&quot;,&quot;required&quot;:&quot;\u003cboolean\u003e&quot;,&quot;value&quot;:{&quot;description&quot;:&quot;The input&#39;s value.&quot;,&quot;nullable&quot;:true}},&quot;messages&quot;:[{&quot;id&quot;:&quot;\u003clong\u003e&quot;,&quot;text&quot;:&quot;\u003cstring\u003e&quot;,&quot;type&quot;:&quot;error&quot;,&quot;context&quot;:{}},{&quot;id&quot;:&quot;\u003clong\u003e&quot;,&quot;text&quot;:&quot;\u003cstring\u003e&quot;,&quot;type&quot;:&quot;error&quot;,&quot;context&quot;:{}}],&quot;meta&quot;:{&quot;label&quot;:{&quot;id&quot;:&quot;\u003clong\u003e&quot;,&quot;text&quot;:&quot;\u003cstring\u003e&quot;,&quot;type&quot;:&quot;info&quot;,&quot;context&quot;:{}}}},{&quot;type&quot;:&quot;text&quot;,&quot;group&quot;:&quot;lookup_secret&quot;,&quot;attributes&quot;:{&quot;name&quot;:&quot;\u003cstring\u003e&quot;,&quot;type&quot;:&quot;button&quot;,&quot;disabled&quot;:&quot;\u003cboolean\u003e&quot;,&quot;node_type&quot;:&quot;img&quot;,&quot;autocomplete&quot;:&quot;url&quot;,&quot;label&quot;:{&quot;id&quot;:&quot;\u003clong\u003e&quot;,&quot;text&quot;:&quot;\u003cstring\u003e&quot;,&quot;type&quot;:&quot;error&quot;,&quot;context&quot;:{}},&quot;onclick&quot;:&quot;\u003cstring\u003e&quot;,&quot;onload&quot;:&quot;\u003cstring\u003e&quot;,&quot;pattern&quot;:&quot;\u003cstring\u003e&quot;,&quot;required&quot;:&quot;\u003cboolean\u003e&quot;,&quot;value&quot;:{&quot;description&quot;:&quot;The input&#39;s value.&quot;,&quot;nullable&quot;:true}},&quot;messages&quot;:[{&quot;id&quot;:&quot;\u003clong\u003e&quot;,&quot;text&quot;:&quot;\u003cstring\u003e&quot;,&quot;type&quot;:&quot;error&quot;,&quot;context&quot;:{}},{&quot;id&quot;:&quot;\u003clong\u003e&quot;,&quot;text&quot;:&quot;\u003cstring\u003e&quot;,&quot;type&quot;:&quot;info&quot;,&quot;context&quot;:{}}],&quot;meta&quot;:{&quot;label&quot;:{&quot;id&quot;:&quot;\u003clong\u003e&quot;,&quot;text&quot;:&quot;\u003cstring\u003e&quot;,&quot;type&quot;:&quot;error&quot;,&quot;context&quot;:{}}}}],&quot;messages&quot;:[{&quot;id&quot;:&quot;\u003clong\u003e&quot;,&quot;text&quot;:&quot;\u003cstring\u003e&quot;,&quot;type&quot;:&quot;success&quot;,&quot;context&quot;:{}},{&quot;id&quot;:&quot;\u003clong\u003e&quot;,&quot;text&quot;:&quot;\u003cstring\u003e&quot;,&quot;type&quot;:&quot;success&quot;,&quot;context&quot;:{}}]},&quot;state&quot;:{&quot;description&quot;:&quot;State represents the state of this request:\n\nchoose_method: ask the user to choose a method (e.g. registration with email)\nsent_email: the email has been sent to the user\npassed_challenge: the request was successful and the registration challenge was passed.&quot;},&quot;active&quot;:&quot;totp&quot;,&quot;oauth2_login_challenge&quot;:&quot;\u003cstring\u003e&quot;,&quot;oauth2_login_request&quot;:{&quot;challenge&quot;:&quot;\u003cstring\u003e&quot;,&quot;client&quot;:{&quot;access_token_strategy&quot;:&quot;\u003cstring\u003e&quot;,&quot;allowed_cors_origins&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;audience&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;authorization_code_grant_access_token_lifespan&quot;:&quot;\u003cstring\u003e&quot;,&quot;authorization_code_grant_id_token_lifespan&quot;:&quot;\u003cstring\u003e&quot;,&quot;authorization_code_grant_refresh_token_lifespan&quot;:&quot;\u003cstring\u003e&quot;,&quot;backchannel_logout_session_required&quot;:&quot;\u003cboolean\u003e&quot;,&quot;backchannel_logout_uri&quot;:&quot;\u003cstring\u003e&quot;,&quot;client_credentials_grant_access_token_lifespan&quot;:&quot;\u003cstring\u003e&quot;,&quot;client_id&quot;:&quot;\u003cstring\u003e&quot;,&quot;client_name&quot;:&quot;\u003cstring\u003e&quot;,&quot;client_secret&quot;:&quot;\u003cstring\u003e&quot;,&quot;client_secret_expires_at&quot;:&quot;\u003clong\u003e&quot;,&quot;client_uri&quot;:&quot;\u003cstring\u003e&quot;,&quot;contacts&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;created_at&quot;:&quot;\u003cdateTime\u003e&quot;,&quot;frontchannel_logout_session_required&quot;:&quot;\u003cboolean\u003e&quot;,&quot;frontchannel_logout_uri&quot;:&quot;\u003cstring\u003e&quot;,&quot;grant_types&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;implicit_grant_access_token_lifespan&quot;:&quot;\u003cstring\u003e&quot;,&quot;implicit_grant_id_token_lifespan&quot;:&quot;\u003cstring\u003e&quot;,&quot;jwks&quot;:{&quot;description&quot;:&quot;OAuth 2.0 Client JSON Web Key Set  Client&#39;s JSON Web Key Set [JWK] document, passed by value. The semantics of the jwks parameter are the same as the jwks_uri parameter, other than that the JWK Set is passed by value, rather than by reference. This parameter is intended only to be used by Clients that, for some reason, are unable to use the jwks_uri parameter, for instance, by native applications that might not have a location to host the contents of the JWK Set. If a Client can use jwks_uri, it MUST NOT use jwks. One significant downside of jwks is that it does not enable key rotation (which jwks_uri does, as described in Section 10 of OpenID Connect Core 1.0 [OpenID.Core]). The jwks_uri and jwks parameters MUST NOT be used together.&quot;},&quot;jwks_uri&quot;:&quot;\u003cstring\u003e&quot;,&quot;jwt_bearer_grant_access_token_lifespan&quot;:&quot;\u003cstring\u003e&quot;,&quot;logo_uri&quot;:&quot;\u003cstring\u003e&quot;,&quot;metadata&quot;:{},&quot;owner&quot;:&quot;\u003cstring\u003e&quot;,&quot;policy_uri&quot;:&quot;\u003cstring\u003e&quot;,&quot;post_logout_redirect_uris&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;redirect_uris&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;refresh_token_grant_access_token_lifespan&quot;:&quot;\u003cstring\u003e&quot;,&quot;refresh_token_grant_id_token_lifespan&quot;:&quot;\u003cstring\u003e&quot;,&quot;refresh_token_grant_refresh_token_lifespan&quot;:&quot;\u003cstring\u003e&quot;,&quot;registration_access_token&quot;:&quot;\u003cstring\u003e&quot;,&quot;registration_client_uri&quot;:&quot;\u003cstring\u003e&quot;,&quot;request_object_signing_alg&quot;:&quot;\u003cstring\u003e&quot;,&quot;request_uris&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;response_types&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;scope&quot;:&quot;\u003cstring\u003e&quot;,&quot;sector_identifier_uri&quot;:&quot;\u003cstring\u003e&quot;,&quot;skip_consent&quot;:&quot;\u003cboolean\u003e&quot;,&quot;skip_logout_consent&quot;:&quot;\u003cboolean\u003e&quot;,&quot;subject_type&quot;:&quot;\u003cstring\u003e&quot;,&quot;token_endpoint_auth_method&quot;:&quot;\u003cstring\u003e&quot;,&quot;token_endpoint_auth_signing_alg&quot;:&quot;\u003cstring\u003e&quot;,&quot;tos_uri&quot;:&quot;\u003cstring\u003e&quot;,&quot;updated_at&quot;:&quot;\u003cdateTime\u003e&quot;,&quot;userinfo_signed_response_alg&quot;:&quot;\u003cstring\u003e&quot;},&quot;oidc_context&quot;:{&quot;acr_values&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;display&quot;:&quot;\u003cstring\u003e&quot;,&quot;id_token_hint_claims&quot;:{&quot;laboris_b9&quot;:{}},&quot;login_hint&quot;:&quot;\u003cstring\u003e&quot;,&quot;ui_locales&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;]},&quot;request_url&quot;:&quot;\u003cstring\u003e&quot;,&quot;requested_access_token_audience&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;requested_scope&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;session_id&quot;:&quot;\u003cstring\u003e&quot;,&quot;skip&quot;:&quot;\u003cboolean\u003e&quot;,&quot;subject&quot;:&quot;\u003cstring\u003e&quot;},&quot;organization_id&quot;:&quot;\u003cstring\u003e&quot;,&quot;return_to&quot;:&quot;\u003cstring\u003e&quot;,&quot;session_token_exchange_code&quot;:&quot;\u003cstring\u003e&quot;,&quot;transient_payload&quot;:{}}