<@U04UQ68083H> If I have the login flow ID in the ...
# ory-copilot
l
@chilly-king-10285 If I have the login flow ID in the kratos which was completed, Can I get the new session token from that login flow ID later?
c
A message from kapa.ai
No, you cannot get a new session token from a completed login flow ID later. Once a login flow is completed successfully, a session cookie or session token will be issued. However, if you need to retrieve the flow data later, you can do so by sending a GET request to the
/self-service/login/flows?id=<flow-id>
endpoint with the flow ID. Please note that the flow ID has an expiration time, so it's important to check the response status code when retrieving the flow data using an existing flow ID. If the flow has expired, you will need to initiate a new flow. Here is an example of how to get flow data using the flow ID:
Copy code
bash curl -X GET \    -H 'Content-Type: application/json' \    -H 'Accept: application/json' \    -c cookies.txt \    "https://{project.slug}.<http://projects.oryapis.com/self-service/login/flows?id=<your-flow-id|projects.oryapis.com/self-service/login/flows?id=<your-flow-id>>"
For more information, you can refer to the [Ory Kratos API documentation](https://www.ory.sh/docs/kratos/reference/api#tag/frontend/operation/getLoginFlow).