[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-03-04 UTC."],[[["\u003cp\u003eThis endpoint creates a session cookie using a valid Identity Platform ID token to maintain a user's login state.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003etargetProjectId\u003c/code\u003e path parameter is required to specify the project ID associated with the user account.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must include the \u003ccode\u003eidToken\u003c/code\u003e, the \u003ccode\u003evalidDuration\u003c/code\u003e (between five minutes and fourteen days), and optionally the \u003ccode\u003etenantId\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe endpoint accepts requests via HTTP POST to the provided URL \u003ccode\u003ehttps://identitytoolkit.googleapis.com/v1/projects/{targetProjectId}:createSessionCookie\u003c/code\u003e .\u003c/p\u003e\n"],["\u003cp\u003eAuthorization for this request requires either the \u003ccode\u003ehttps://www.googleapis.com/auth/identitytoolkit\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e OAuth scope.\u003c/p\u003e\n"]]],[],null,["# Method: projects.createSessionCookie\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nCreates a session cookie for the given Identity Platform ID token. The session cookie is used by the client to preserve the user's login state.\n\n### HTTP request\n\n`POST https://identitytoolkit.googleapis.com/v1/projects/{targetProjectId}:createSessionCookie`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body contains data with the following structure:\n\n### Response body\n\nIf successful, the response body contains an instance of [CreateSessionCookieResponse](/identity-platform/docs/reference/rest/v1/CreateSessionCookieResponse).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/identitytoolkit`\n- `\n https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp)."]]