Configure Google Flow Account

November 17, 2025 (November 16, 2026)

Table of contents

  1. Request Headers
  2. Request Body
  3. Responses
  4. Model
  5. Examples
  6. Try It

Configure your Google Flow account for API access using cookies from your authenticated Google account. The API signs in to Google Flow with them and keeps that sign-in fresh by itself, every 2 to 3 days.

Each useapi.net subscription covers 3 Google Flow accounts, up to a hard limit of 50.

https://api.useapi.net/v1/google-flow/accounts

Request Headers

Authorization: Bearer {API token}
Content-Type: application/json
# Alternatively you can use multipart/form-data
# Content-Type: multipart/form-data

Request Body

{
  "cookies": "Name\tValue\tDomain\tPath\tExpires\t..."
}
  • cookies is required. Cookies copied from Chrome DevTools in table format: copy all the cookies of accounts.google.com, which include HSID, LSID, SID, SSID, APISID and SAPISID. See Setup Google Flow for detailed instructions on how to obtain these cookies, or use the automated setup, which signs in to Google in a browser and adds the account for you.

Responses

  • 200 OK

    Existing account configuration updated successfully. The fields are the same as in the 201 response: created keeps the date of the first add and updated is the date of this one. accountCookies holds the same six cookies as in the 201 example, shortened here to one.

    {
      "accountCookies": [
        {
          "name": "HSID",
          "value": "AYQab…redacted…xY12z",
          "domain": ".google.com",
          "path": "/",
          "expires": "2027-11-26T16:03:52.000Z",
          "httpOnly": true,
          "secure": false,
          "sameSite": "Lax"
        }
      ],
      "flowCookies": [
        {
          "name": "OSID",
          "value": "g.a00…redacted…Hj076",
          "domain": "flow.google.com",
          "path": "/",
          "expires": "2027-11-26T16:04:09.000Z",
          "httpOnly": false,
          "secure": true,
          "sameSite": "Lax"
        }
      ],
      "created": "2025-11-10T12:00:00.000Z",
      "updated": "2026-10-22T16:04:11.512Z",
      "project": {
        "projectId": "3b1c0e9d-7a6f-4592-8d38-7f9e1b4c6a5d",
        "projectTitle": "Nov 11 - 02:56"
      },
      "nextRefresh": {
        "messageId": "msg_2…redacted…Fq9Wd",
        "scheduledFor": "2026-10-23T16:11:37.000Z"
      },
      "backend": "flow",
      "email": "jane.doe@gmail.com"
    }
    
  • 201 Created

    New account configuration created successfully.

    {
      "accountCookies": [
        {
          "name": "HSID",
          "value": "AYQab…redacted…xY12z",
          "domain": ".google.com",
          "path": "/",
          "expires": "2027-11-26T16:03:52.000Z",
          "httpOnly": true,
          "secure": false,
          "sameSite": "Lax"
        },
        {
          "name": "LSID",
          "value": "o.myg…redacted…Kq7Lw",
          "domain": "accounts.google.com",
          "path": "/",
          "expires": "2027-11-26T16:03:52.000Z",
          "httpOnly": true,
          "secure": true,
          "sameSite": "Lax"
        },
        {
          "name": "SID",
          "value": "g.a00…redacted…Zp076",
          "domain": ".google.com",
          "path": "/",
          "expires": "2027-11-26T16:03:52.000Z",
          "httpOnly": false,
          "secure": false,
          "sameSite": "Lax"
        },
        {
          "name": "SSID",
          "value": "A1b2C…redacted…9dE3f",
          "domain": ".google.com",
          "path": "/",
          "expires": "2027-11-26T16:03:52.000Z",
          "httpOnly": true,
          "secure": true,
          "sameSite": "Lax"
        },
        {
          "name": "APISID",
          "value": "Rt5uV…redacted…Lw8Qa",
          "domain": ".google.com",
          "path": "/",
          "expires": "2027-11-26T16:03:52.000Z",
          "httpOnly": false,
          "secure": false,
          "sameSite": "Lax"
        },
        {
          "name": "SAPISID",
          "value": "Zx3cV…redacted…pQ1sD",
          "domain": ".google.com",
          "path": "/",
          "expires": "2027-11-26T16:03:52.000Z",
          "httpOnly": false,
          "secure": true,
          "sameSite": "Lax"
        }
      ],
      "flowCookies": [
        {
          "name": "OSID",
          "value": "g.a00…redacted…Hj076",
          "domain": "flow.google.com",
          "path": "/",
          "expires": "2027-11-26T16:04:09.000Z",
          "httpOnly": false,
          "secure": true,
          "sameSite": "Lax"
        }
      ],
      "created": "2026-10-22T16:04:11.512Z",
      "updated": "2026-10-22T16:04:11.512Z",
      "project": {
        "projectId": "3b1c0e9d-7a6f-4592-8d38-7f9e1b4c6a5d",
        "projectTitle": "Oct 22 - 16:04"
      },
      "nextRefresh": {
        "messageId": "msg_2…redacted…Fq9Wd",
        "scheduledFor": "2026-10-23T16:11:37.000Z"
      },
      "backend": "flow",
      "email": "jane.doe@gmail.com"
    }
    
  • 400 Bad Request

    The cookies are missing one that the Google Flow sign-in needs, or Google would not sign them in to Google Flow.

    {
      "error": "Missing required cookies: APISID, SAPISID. Add the account again: guided browser setup, or ALL cookies from accounts.google.com. See https://useapi.net/docs/start-here/setup-google-flow",
      "code": 400
    }
    
    {
      "error": "These cookies are not signed in to Google Flow. Google treats these cookies as signed out: the account was signed out, or the cookies are from an older session. Sign in again and copy fresh cookies right away, or use the automated setup at https://useapi.net/assets/setup-browser/google-flow. Setup guide: https://useapi.net/docs/start-here/setup-google-flow",
      "code": 400
    }
    

    When Google will not sign the cookies in, the message names the reason and what to do: the account is signed out, Google wants a password or 2-step check first, the account has a notice to accept, a Google Workspace administrator blocked Google Flow, or the cookies were copied from a browser that ties the session to its device.

  • 404 — update mode: no account is configured for the given email.

    { "error": "Account user@email.com not found", "code": 404 }
    
  • 401 Unauthorized

    Invalid API token.

    {
      "error": "useapi.net ⁝ Unauthorized",
      "code": 401
    }
    
  • 402 Payment Required

    Subscription expired or insufficient credits.

    {
      "error": "useapi.net ⁝ Your account has no subscription, please subscribe to our services before submitting requests",
      "code": 402
    }
    

Model

The account as stored, with its masked cookies, its projects and its next automatic refresh.

The account, field by field
  • email - The email address of the Google account, used as email in every other endpoint
  • backend - flow for every account added now: it holds the flow.google.com cookies the API signs in with. labs marks an account added before 2026-09-12 without the APISID and SAPISID cookies, which stopped working on 2026-10-21. Every request for it answers 596: add it again with the automated setup
  • created - ISO 8601 timestamp when the account was first configured, kept unchanged when you add the same account again
  • updated - ISO 8601 timestamp of the most recent add, so you can tell when the account last got fresh cookies (the automatic refresh does not change it)
  • accountCookies - The Google account cookies kept from your cookies, with each value masked to its first and last five characters
  • flowCookies - The flow.google.com sign-in cookie (OSID) the API uses for every Google Flow request, masked the same way
  • project - Google Flow project for this account, created on the first add and kept when you add the account again — unless that project was deleted in Google Flow, in which case a new one is created
  • nextRefresh - When the next automatic refresh runs. The API refreshes the account every 2 to 3 days: it signs in to Google Flow again with the account cookies and replaces the OSID cookie
  • projectEntity and projectAgent - The projects that hold the account’s characters and voices, and its agent chats, kept when you add the account again

Secret values come back masked: every cookie value, sessionData.access_token and nextRefresh.messageId show their first and last five characters around …redacted… (a value of ten characters or fewer shows as …redacted… alone).

{
  email: string                // Google account email
  backend: 'flow' | 'labs'     // flow: the account signs in with its `flow.google.com` cookies. labs: an account added
                               // before 2026-09-12 that stopped working on 2026-10-21, add it again
  created: string              // ISO 8601 timestamp, first add
  updated: string              // ISO 8601 timestamp, this add
  accountCookies: Array<{      // the Google sign-in cookies kept for the account: HSID, LSID, SID, SSID, APISID and SAPISID
    name: string               // cookie name
    value: string              // Masked
    domain: string             // cookie domain
    path: string               // cookie path
    expires: string | number   // ISO 8601 timestamp, Unix seconds, or -1 for a session cookie
    httpOnly: boolean          // the cookie's HttpOnly flag
    secure: boolean            // the cookie's Secure flag
    sameSite: 'Lax' | 'Strict' | 'None'  // the cookie's SameSite setting
  }>
  flowCookies: Array<{         // Same structure, one OSID cookie for flow.google.com
    name: string               // cookie name
    value: string              // Masked
    domain: string             // cookie domain
    path: string               // cookie path
    expires: string | number   // ISO 8601 timestamp, Unix seconds, or -1 for a session cookie
    httpOnly: boolean          // the cookie's HttpOnly flag
    secure: boolean            // the cookie's Secure flag
    sameSite: 'Lax' | 'Strict' | 'None'  // the cookie's SameSite setting
  }>
  sessionCookies?: Array<{     // Same structure, kept from the old Google Labs sign-in when an account first added before 2026-10-21 is added again, no longer used
    name: string               // cookie name
    value: string              // Masked
    domain: string             // cookie domain
    path: string               // cookie path
    expires: string | number   // ISO 8601 timestamp, Unix seconds, or -1 for a session cookie
    httpOnly: boolean          // the cookie's HttpOnly flag
    secure: boolean            // the cookie's Secure flag
    sameSite: 'Lax' | 'Strict' | 'None'  // the cookie's SameSite setting
  }>
  sessionData?: {              // kept from the old Google Labs sign-in when an account first added before 2026-10-21 is added again, no longer used
    user: {                    // the Google account of that sign-in
      name: string             // its display name
      email: string            // its email
      image: string            // its profile picture URL
    }
    expires: string            // ISO 8601 timestamp, when that sign-in expired
    access_token: string       // Masked
  }
  project: {                   // the account's Google Flow project, where generations go; adding the account again keeps it while Google still has it
    projectId: string          // Google Flow project id
    projectTitle: string       // project title, set when the project was created
  }
  projectEntity?: {            // kept when the account is added again: the project that holds its characters and custom voices
    projectId: string          // Google Flow project id
    projectTitle: string       // project title, set when the project was created
  }
  projectAgent?: {             // kept when the account is added again: the project where its agent chats run
    projectId: string          // Google Flow project id
    projectTitle: string       // project title, set when the project was created
  }
  nextRefresh: {               // the next automatic session refresh, normally 2 to 3 days out
    messageId: string          // Masked
    scheduledFor: string       // ISO 8601 timestamp
  }
  setupSession?: string        // the automated setup session that added the account, only when it was added that way
}

Examples

  • curl -H "Accept: application/json" \
         -H "Content-Type: application/json" \
         -H "Authorization: Bearer YOUR_API_TOKEN" \
         -X POST "https://api.useapi.net/v1/google-flow/accounts" \
         -d '{
           "cookies": "HSID\tAYQ...\t.google.com\t/\t2027-11-10...\nSSID\tAbc...\t.google.com\t/\t2027-11-10..."
         }'
    
  • import requests
    
    apiUrl = 'https://api.useapi.net/v1/google-flow/accounts'
    token = 'YOUR_API_TOKEN'
    cookies = """HSID\tAYQ...\t.google.com\t/\t2027-11-10...
    SSID\tAbc...\t.google.com\t/\t2027-11-10..."""
    
    headers = {
        'Content-Type': 'application/json',
        'Authorization': f'Bearer {token}'
    }
    
    body = {
        'cookies': cookies
    }
    
    response = requests.post(apiUrl, headers=headers, json=body)
    print(response.status_code, response.json())
    
  • const apiUrl = 'https://api.useapi.net/v1/google-flow/accounts';
    const token = 'YOUR_API_TOKEN';
    const cookies = `HSID\tAYQ...\t.google.com\t/\t2027-11-10...
    SSID\tAbc...\t.google.com\t/\t2027-11-10...`;
    
    const response = await fetch(apiUrl, {
      method: 'POST',
      headers: {
        'Authorization': `Bearer ${token}`,
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        cookies: cookies
      })
    });
    
    const result = await response.json();
    console.log('Account configured:', result);
    

Try It

See Setup Google Flow page.