flaky-kilobyte-10585
11/17/2023, 9:35 AMchilly-king-10285
11/17/2023, 9:35 AMchilly-king-10285
11/17/2023, 9:36 AMlink
and code
. For browser applications, you should use the /self-service/verification/browser
endpoint. Here is an example of how to do this with a cURL command: bash curl -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -c cookies.txt \ https://{project.slug}.<http://projects.oryapis.com/self-service/verification/browser|projects.oryapis.com/self-service/verification/browser>
(Source: [Ory Documentation](https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-basic-integration)) For native applications, you should use the /self-service/verification/api
endpoint. Here is an example of how to do this in TypeScript: typescript import { Configuration, FrontendApi } from "@ory/client" const frontend = new FrontendApi( new Configuration({ basePath: `https://${process.env.ORY_PROJECT_SLUG}.<http://projects.oryapis.com|projects.oryapis.com>`, }), ) export async function createVerification() { return await frontend.createNativeVerificationFlow() }
(Source: [Ory Documentation](https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-basic-integration)) Please note that these endpoints do not require authentication ([Ory API Reference](https://www.ory.sh/docs/kratos/reference/api)).flaky-kilobyte-10585
11/17/2023, 9:37 AMflaky-kilobyte-10585
11/17/2023, 9:37 AMchilly-king-10285
11/17/2023, 9:37 AMchilly-king-10285
11/17/2023, 9:38 AM/self-service/verification/browser
) and one for native apps (/self-service/verification/api
). However, the documentation specifically mentions that the /self-service/verification/api
endpoint should not be used in server-side applications like NodeJS, PHP, Golang, etc., as it could make your application vulnerable to CSRF attacks. This endpoint is intended only for native mobile apps. Unfortunately, the provided extracts do not mention a specific endpoint for initiating a verification flow from a back-end server. It's recommended to refer to the [Ory Kratos API documentation](https://www.ory.sh/docs/kratos/reference/api) for more detailed information.