Sign in with a Google ID token
const url = 'https://your-tenant-host/v1/id/sign-in/google';const options = { method: 'POST', headers: {'x-edgekit-site-id': 'site_example', 'Content-Type': 'application/json'}, body: '{"idToken":"eyJhbGciOiJSUzI1…","nonce":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://your-tenant-host/v1/id/sign-in/google \ --header 'Content-Type: application/json' \ --header 'x-edgekit-site-id: site_example' \ --data '{ "idToken": "eyJhbGciOiJSUzI1…", "nonce": "example" }'Verifies a Google ID token the page already holds and mints an EdgeKit session, creating the user when the address is new. 404 wherever EdgeKit sign-in is not offered, and 404 when this tenant carries no Google credential — the surface does not confirm the method exists elsewhere. There is no redirect flow: the browser gets the token from Google Identity Services and posts it here, so nothing on this surface is a top-level navigation. Registration traits are not accepted; a Google user answers them on the account screen. Safe to retry with the same token while it is valid: each call mints a new session.
Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”The site this request is for, within this tenant. Every official EdgeKit SDK sets it from the client you configured; set it yourself only when calling this API directly.
Example
site_exampleThe site this request is for, within this tenant. Every official EdgeKit SDK sets it from the client you configured; set it yourself only when calling this API directly.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Example
eyJhbGciOiJSUzI1…Responses
Section titled “Responses”The user is signed in.
object
object
object
Example
{ "user": { "id": "01926f3a-8b4c-7d2e-9f10-2a3b4c5d6e7f", "email": "user@example.com", "emailVerified": true, "name": "Ada Lovelace", "firstName": "Ada", "lastName": "Lovelace", "image": null }, "session": { "id": "01926f3a-8b4d-7a11-8c22-3d4e5f6a7b8c", "kind": "edgekit", "expiresAt": "2026-08-30T09:00:00.000Z" }}Invalid request.
object
object
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}Not allowed.
object
object
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}Resource not found.
object
object
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}Request validation failed.
object
object
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}Unexpected error.
object
object
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}