Skip to content

Instantly share code, notes, and snippets.

@oldmud0
Created June 10, 2021 02:07
Show Gist options
  • Save oldmud0/2ef0011c5cc67e485ca91a3cad67c6be to your computer and use it in GitHub Desktop.
Save oldmud0/2ef0011c5cc67e485ca91a3cad67c6be to your computer and use it in GitHub Desktop.
Google Foobar API v1

Base URL: https://foobar.withgoogle.com/api/v1

Supports HTTP/3. Server name is "Google Frontend." You will need a sessionid and SACSID cookie.

All POST requests use form data.

POST /commands/save

request

  • path: VFS path, including trailing slash, of file to submit
  • content: content of the file, with CRLF line endings encoded as \r\n, and spaces encoded as +

response

204 No Content

POST /commands/verify

request

  • path: VFS path, including trailing slash, of file to submit

response

{
  // Unescaped HTML feedback printed on terminal
  output: string
  // Score of tests (0-100?)
  score: number
}

POST /commands/submit

request

  • path: VFS path, including trailing slash, of file to submit

response

{
  files: {
    // base name of file (with extension)
    name: string
    // path to file, including filename
    path: string
    type: "file"
    editable: boolean
    // parent directory
    parent: string
    // unescaped HTML content of file
    content: string
    // MIME type of content
    content_type: string
  }[]
  output: string
  score: number
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment