Auth

Start Google OAuth flow

Initiates Google OAuth for app end-users. Returns an authorization_url to open in a popup or redirect. After Google auth, the callback delivers a one-time code to your redirect_url, which you exchange via POST /auth/v1/token?grant_type=authorization_code.

post/auth/v1/oauth/google/start

Request

  • Base URL: https://api.run402.com
  • URL: https://api.run402.com/auth/v1/oauth/google/start
  • Auth: API key in header apikey

Request body

redirect_urlstring required

Where to send the auth code after Google login. Must be http://localhost:* or a added subdomain (https://{name}.run402.com).

mode'redirect' | 'popup'

Redirect mode (default) navigates the full page. Popup mode opens a window but window.close() may be blocked by browser COOP policies.

intent'signin' | 'link'
code_challengestring

PKCE code challenge (base64url of SHA-256 of verifier)

code_challenge_method'S256'
client_statestring

Opaque state passed back to your redirect_url

login_hintstring

Email hint for Google account picker

Response

Authorization URL to open in browser

providerstring
authorization_urlstring uri
expires_ininteger

Example response

{
  "provider": "google",
  "expires_in": 600
}

Changes

No recorded changes to this operation across all 1 revision of this API.