{"connections":[{"id":"googleapis","title":"googleapis (TypeScript)","kind":"sdk","language":"typescript","description":"Point the official googleapis client at the emulator via per-service rootUrl options.","template":"import { google } from \"googleapis\";\n\nconst auth = new google.auth.OAuth2({\n  clientId: \"{{clientId}}\",\n  clientSecret: \"{{clientSecret}}\",\n});\nauth.setCredentials({ access_token: \"{{token}}\" });\n\nconst gmail = google.gmail({\n  version: \"v1\",\n  auth,\n  rootUrl: \"{{baseUrl}}/\",\n});\n\nconst { data } = await gmail.users.messages.list({ userId: \"me\" });","body":"import { google } from \"googleapis\";\n\nconst auth = new google.auth.OAuth2({\n  clientId: \"<client_id>\",\n  clientSecret: \"<client_secret>\",\n});\nauth.setCredentials({ access_token: \"<token>\" });\n\nconst gmail = google.gmail({\n  version: \"v1\",\n  auth,\n  rootUrl: \"https://google.your-instance.emulators.dev/\",\n});\n\nconst { data } = await gmail.users.messages.list({ userId: \"me\" });"},{"id":"oauth-discovery","title":"OpenID discovery (fetch)","kind":"sdk","language":"typescript","description":"Discover the OIDC endpoints, then drive the authorization code flow against the emulator.","template":"const discovery = await fetch(\n  \"{{baseUrl}}/.well-known/openid-configuration\",\n).then((r) => r.json());\n\n// discovery.authorization_endpoint, discovery.token_endpoint, etc.\nconst userinfo = await fetch(discovery.userinfo_endpoint, {\n  headers: { authorization: \"Bearer {{token}}\" },\n}).then((r) => r.json());","body":"const discovery = await fetch(\n  \"https://google.your-instance.emulators.dev/.well-known/openid-configuration\",\n).then((r) => r.json());\n\n// discovery.authorization_endpoint, discovery.token_endpoint, etc.\nconst userinfo = await fetch(discovery.userinfo_endpoint, {\n  headers: { authorization: \"Bearer <token>\" },\n}).then((r) => r.json());"},{"id":"google-env","title":"Google API base URL (env)","kind":"env","language":"bash","description":"Point your SDK or app at the emulator instead of Google's production endpoints.","template":"GOOGLE_BASE_URL={{baseUrl}}\nGOOGLE_CLIENT_ID={{clientId}}\nGOOGLE_CLIENT_SECRET={{clientSecret}}\nGOOGLE_ACCESS_TOKEN={{token}}","body":"GOOGLE_BASE_URL=https://google.your-instance.emulators.dev\nGOOGLE_CLIENT_ID=<client_id>\nGOOGLE_CLIENT_SECRET=<client_secret>\nGOOGLE_ACCESS_TOKEN=<token>"},{"id":"curl","title":"curl","kind":"curl","language":"bash","description":"Call the Gmail REST API directly with a bearer access token.","template":"curl -s {{baseUrl}}/gmail/v1/users/me/messages -H \"authorization: Bearer {{token}}\"","body":"curl -s https://google.your-instance.emulators.dev/gmail/v1/users/me/messages -H \"authorization: Bearer <token>\""},{"id":"base-url","title":"Base URL (env)","kind":"env","language":"bash","description":"Point your SDK or app at the emulator instead of the real provider.","template":"{{SERVICE_UPPER}}_BASE_URL={{baseUrl}}","body":"GOOGLE_BASE_URL=https://google.your-instance.emulators.dev"},{"id":"create-credential","title":"Create a credential","kind":"curl","language":"bash","description":"Mint a working credential for this instance.","template":"curl -s -X POST {{controlBaseUrl}}/credentials \\\n  -H \"content-type: application/json\" \\\n  -d '{\"type\":\"{{defaultAuthType}}\"}'","body":"curl -s -X POST https://google.your-instance.emulators.dev/_emulate/credentials \\\n  -H \"content-type: application/json\" \\\n  -d '{\"type\":\"oauth-authorization-code\"}'"},{"id":"inspect-ledger","title":"Inspect requests","kind":"curl","language":"bash","description":"Read the request ledger to validate how your app called the service.","template":"curl -s {{controlBaseUrl}}/ledger","body":"curl -s https://google.your-instance.emulators.dev/_emulate/ledger"}]}