Auth

Mint a deterministic tenant test session

Service-key-only helper for tests and CI. Creates or reuses a watermarked .test.invalid tenant user derived from label, returns a 2-hour browser-session cookie value and a 2-hour bearer access token, and marks actor context with isTest.

post/auth/v1/test-sessions

Request

  • Base URL: https://api.run402.com
  • URL: https://api.run402.com/auth/v1/test-sessions
  • Auth: API key in header apikey and HTTP bearer

Request body

labelstring required

Deterministic local label. The email becomes <label>@<project_id>.test.invalid.

is_adminboolean
email_verifiedboolean
amrstring[]

Requested assurance methods. The platform always adds test_session; passkey creates an internal synthetic passkey for test-only elevation.

auth_time_age_secondsnumber
amr_ages_secondsobject

Response

Watermarked test session bundle

access_tokenstring required

2-hour bearer token with is_test=true. No refresh token is issued.

token_type'bearer' required
expires_ininteger required
app_originsstring[] required

Example response

{
  "session": {
    "cookie_name": "__Host-Http-r402_session"
  },
  "expires_in": 7200
}

Changes

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