---
title: "Initiate OAuth login flow"
method: GET
path: "/accounts/oauth/login"
tags: ["Authentication"]
---

# Initiate OAuth login flow

`GET /accounts/oauth/login`

## Request

- Base URL: `https://api.quiva.ai`
- URL: `https://api.quiva.ai/accounts/oauth/login`
- Auth: none required
- TypeScript: <https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/docs/accounts/oauth/login/get.ts> (a function with typed inputs; its response is checked against the schema)

Generates OAuth URL for authentication with external providers (Auth0)

## Query parameters

- `account` string, required
- `connection` string

## Headers

- `Referer` string, required

## Response `200`

OAuth URL generated successfully

- object
  - `data` object, required
    - `oauth_url` string, uri: URL to redirect user for OAuth authentication

## Other responses

- `400`: Bad request - missing required parameters
- `500`: Internal server error

## Changes

- **2025-06-12** `4979dfd00eda`: 1 breaking, 1 warning, 2 info
  - added the new required `header` request parameter `Referer`
  - removed the optional property `oauth_url` from the response with the `200` status
  - api operation id `getOAuthLoginUrl` was added
  - added the required property `data` to the response with the `200` status
- **2025-06-10** `964e2801b73d`: 2 breaking, 2 info
  - the response's body type changed from no type to `object` for status `400`
  - the response's body type changed from no type to `object` for status `500`
  - added the required property `error` to the response with the `400` status
  - added the required property `error` to the response with the `500` status
- **2025-06-06** `b675c0d97cbd`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/changes/accounts/oauth/login/get.md)

---

[API](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway.md) - [All operations](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/llms.txt) - [OpenAPI document](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/revisions/700eb1ace61a?raw)
