Configure Google Flow Account

November 17, 2025 (October 23, 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": "[email protected]"
    }
    
  • 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": "[email protected]"
    }
    
  • 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"
    }
    
    {
      "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"
    }
    

    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 [email protected] not found", "code": 404 }
    
  • 401 Unauthorized

    Invalid API token.

    {
      "error": "Unauthorized"
    }
    
  • 402 Payment Required

    Subscription expired or insufficient credits.

    {
      "error": "Account has no subscription or subscription expired"
    }
    

Model

  • 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 and must be added again, see Accounts that must be added again
  • 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 an account was last refreshed
  • 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
{ // TypeScript, all fields are optional
  email: string                // Google account email
  backend: 'flow' | 'labs'     // 'labs' accounts must be added again
  created: string              // ISO 8601 timestamp, first add
  updated: string              // ISO 8601 timestamp, most recent add
  accountCookies: Array<{
    name: string
    value: string              // Masked
    domain: string
    path: string
    expires: string | number
    httpOnly: boolean
    secure: boolean
    sameSite: 'Lax' | 'Strict' | 'None'
  }>
  flowCookies: Array<{         // Same structure, one OSID cookie for flow.google.com
    name: string
    value: string              // Masked
    domain: string
    path: string
    expires: string | number
    httpOnly: boolean
    secure: boolean
    sameSite: 'Lax' | 'Strict' | 'None'
  }>
  project: {
    projectId: string
    projectTitle: string
  }
  nextRefresh: {
    messageId: string          // Masked
    scheduledFor: string       // ISO 8601 timestamp
  }
  health?: string              // "OK" | "Error information"
  error?: string               // Error message 
}

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.