Olympus Docs
ReferenceAPIsOry Identities APIfrontend

Create Registration Flow for Native Apps

This endpoint initiates a registration flow for API clients such as mobile devices, smart TVs, and so on.

GET /self-service/registration/api

This endpoint initiates a registration flow for API clients such as mobile devices, smart TVs, and so on.

If a valid provided session cookie or session token is provided, a 400 Bad Request error will be returned unless the URL query parameter ?refresh=true is set.

To fetch an existing registration flow call /self-service/registration/flows?flow=<flow_id>.

You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks.

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.

This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...).

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

Operation ID: createNativeRegistrationFlow    Tag: frontend

Query parameters

NameTypeRequiredDescription
return_session_token_exchange_codebooleannoEnableSessionTokenExchangeCode requests the login flow to include a code that can be used to retrieve the session token after the login flow has been completed.
return_tostringnoThe URL to return the browser to after the flow was completed.
organizationstringnoAn optional organization ID that should be used to register this user. This parameter is only effective in the Ory Network.
identity_schemastringnoAn optional identity schema to use for the registration flow.

Responses

StatusDescriptionBody
200registrationFlowapplication/json, object
400errorGenericapplication/json, object
defaulterrorGenericapplication/json, object

Generated from /tmp/kratos-api.json at build time.

On this page