---
updatedAt: 2026-09-08T20:26:09.000Z
agentTools:
  projectIndex: https://docs.observeinc.com/llms.txt
---

# Start an Observe authtoken creation flow

This endpoint starts an authorization flow that lets an Observe user generate an
authorization token to use for external tools and scripts. This token will have
the same powers as the user authorizing, and can be passed in the
`Authorization: Bearer <customerid> <apitoken>` header of requqests.
This endpoint will return with a URL that the user should visit in a web browser
to allow the token creation; that URL will lead to a page that requires the user
to be logged in (through whatever password or SSO mechanism the user normally uses.)
The response from this endpoint also includes a "serverToken" field, which is a
token that can be used to poll the tenant for the status of the token creation, and
if successful, will return the issued access key.

Essentially, this endpoint implements the Oauth "device" authorization flow.


# OpenAPI definition

````json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Observe by Snowflake API",
    "description": "# Overview\nWelcome to the Observe API Docs!\n\nThe Observe API is a RESTful API. POST bodies and responses are typically JSON-encoded.\n\n## Authentication\nRequests to the Observe API are authenticated with an API token. The token can be supplied using HTTP Bearer authentication:\n```\n// passing token as bearer token\ncurl -H \"Authorization: Bearer <customerid> <token>\" https://<customerid>.<observe-domain>.com/v1/...\n```\n",
    "version": "1.0.230307"
  },
  "servers": [
    {
      "url": "https://{customerid}.observeinc.com",
      "description": "US west server",
      "variables": {
        "customerid": {
          "default": "OBSERVE_CUSTOMERID",
          "description": "The customer ID for your instance."
        }
      }
    },
    {
      "url": "https://{customerid}.{cluster}.observeinc.com",
      "description": "Specific regional cluster (prod)",
      "variables": {
        "customerid": {
          "default": "OBSERVE_CUSTOMERID",
          "description": "The customer ID for your instance."
        },
        "cluster": {
          "enum": [
            "eu-1",
            "ap-1"
          ],
          "default": "eu-1",
          "description": "For regional clusters, choose one."
        }
      }
    },
    {
      "url": "https://{customerid}.{domain}.com",
      "description": "Specific Observe server",
      "variables": {
        "customerid": {
          "default": "OBSERVE_CUSTOMERID",
          "description": "The customer ID for your instance."
        },
        "domain": {
          "default": "OBSERVE_DOMAIN",
          "description": "The Observe domain for your instance."
        }
      }
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Login",
      "description": "Manage api tokens. Learn more about [api tokens](https://docs.observeinc.com/en/latest/content/reference/ObserveAPIAuth.html).\n"
    }
  ],
  "paths": {
    "/v1/login/delegated": {
      "post": {
        "summary": "Start an Observe authtoken creation flow",
        "operationId": "startDelegatedLogin",
        "tags": [
          "Login"
        ],
        "description": "This endpoint starts an authorization flow that lets an Observe user generate an\nauthorization token to use for external tools and scripts. This token will have\nthe same powers as the user authorizing, and can be passed in the\n`Authorization: Bearer <customerid> <apitoken>` header of requqests.\nThis endpoint will return with a URL that the user should visit in a web browser\nto allow the token creation; that URL will lead to a page that requires the user\nto be logged in (through whatever password or SSO mechanism the user normally uses.)\nThe response from this endpoint also includes a \"serverToken\" field, which is a\ntoken that can be used to poll the tenant for the status of the token creation, and\nif successful, will return the issued access key.\n\nEssentially, this endpoint implements the Oauth \"device\" authorization flow.\n",
        "security": [],
        "requestBody": {
          "description": "The credentials to authorize as.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "userEmail",
                  "clientToken",
                  "integration"
                ],
                "properties": {
                  "userEmail": {
                    "description": "The email address of the user to mint credentials for.",
                    "type": "string"
                  },
                  "clientToken": {
                    "description": "A token generated by the client to identify this particular request.\nWe recommend a random alphanumeric string of length 24 characters or\nmore to avoid collisions. There is no power or security imbued into\nthis token, other than to tell different simultaneous authorization\nrequests for the same user apart.\n",
                    "type": "string"
                  },
                  "integration": {
                    "description": "The identifier of the particular integration making this request.\nIntegration should be configured in the Observe back-end, but there\nis currently no UI for this, so you can use the ID of the Observe\ncommand-line tool `observe-tool-abdaf0`.\n",
                    "type": "string"
                  }
                }
              },
              "example": {
                "userEmail": "user@example.com",
                "clientToken": "ZrL5BhtFXvu2Xe78GznP1dP2Ts81ZszA",
                "integration": "observe-tool-abdaf0"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "This request generates a \"pending\" login request, which the user will have\nto authorize on the Observe website. Send the user to the given URL in a\nweb browser, and then poll the API for the completion endpoint to see whether\nthe user accepts, denies, or times out the request.\n",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "url",
                    "serverToken"
                  ],
                  "properties": {
                    "url": {
                      "description": "The URL to send the user to in a web browser.",
                      "type": "string"
                    },
                    "serverToken": {
                      "description": "A token that can be used to poll the tenant for the status of the token creation.\nThis token has some authorization power (because it can be exchanged, once, for a\nreal token) so treat it carefully.\n",
                      "type": "string",
                      "format": "password"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "description": "Whether this HTTP request was valid (does not indicate completion status).",
                      "type": "boolean"
                    },
                    "message": {
                      "description": "A message from the server. In case of error, this may be helpful to display to the user.\n",
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "ok": false,
                  "message": "Invalid request."
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Authorization: Bearer <customerid> <apitoken>\n"
      }
    }
  }
}
````