---
title: "Initiate Oauth"
method: GET
path: "/v2/credentials/{platform}/auth-url"
tags: ["Credentials v2"]
---

# Initiate Oauth

`GET /v2/credentials/{platform}/auth-url`

## Request

- Base URL: `https://api.jubjubapp.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.jubjubapp.com/v2/credentials/{platform}/auth-url`
- Auth: HTTP bearer

Initiate OAuth flow for a platform.

Returns an auth URL to redirect the user for authorization.

Optional query params for post-callback navigation:
    return_context_flow: Flow identifier (e.g. "try_now_onboarding")
    return_context_workspace_id: Workspace ID for try-now flows

reconnect_credential_id: the credential this login RECONNECTS (the
Reconnect button on a card). The callback then refuses a login that comes
back as a different account instead of saving it to another credential or
creating a new one. Absent, this is a new connection, exactly as before.

## Path parameters

- `platform` string, required

## Query parameters

- `return_context_flow` string, nullable
- `return_context_workspace_id` string, nullable
- `reconnect_credential_id` string, nullable

## Headers

- `Authorization` string
- `X-JubJub-Service-Key` string
- `X-JubJub-Agent-Key` string
- `X-JubJub-Platform-Key` string
- `Origin` string
- `Referer` string
- `X-JubJub-Trial-Token` string

## Response `200`

Successful Response

- OAuthInitiateResponse: Response when initiating OAuth flow.
  - `auth_url` string, required: URL to redirect user for OAuth
  - `state` string, required: State token for CSRF protection

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/jubjubapp/apis/jubjub-api.md) - [All operations](https://skmtc.dev/jubjubapp/apis/jubjub-api/llms.txt) - [OpenAPI document](https://skmtc.dev/jubjubapp/apis/jubjub-api/revisions/353157b296f2?raw)
