Skip to main content
Notifications

Create SSE ticket

POST/v4/config/platform/sse-ticket

Exchanges the Authorization header of the caller for a one-time ticket for one Server-Sent Events (SSE) operation. A browser EventSource cannot set request headers: your backend calls this operation with its API key or token, and the browser puts only the ticket in the ticket query parameter of the SSE operation. The API key then never appears in a URL, a browser or an access log.

Give one of these SSE operations in path:

  • /v4/config/ows/holder/notification-stream: Stream notifications (SSE)
  • /v4/config/ows/verifier/verification-status-stream: Stream verification status (SSE)
  • /v4/config/platform/admin/authentication/oidc/user/authenticator/sse: the passwordless login stream of the signed-in admin (an access token only, not an API key)

Rules:

  • The caller must be allowed to open the SSE operation of path: a ticket never gives more access than the Authorization header that got it. The SSE request with the ticket runs as the caller of this operation.
  • A ticket is valid for expiresIn seconds (30) and for one request to path. An unknown, used or expired ticket, or a ticket for another path, gives HTTP 401 on the SSE operation.
  • Get a new ticket for each connection, also when the client reconnects.

Authorizations

  • Authorizationstringheaderrequired

    Your API key with the prefix ApiKey: ApiKey <your-api-key>. Get an API key.

    Scope:notifications:create

Body

application/json
  • pathenum<string>required

    Required. The path of the SSE operation (with /v4) that the ticket is for.

    Available options:/v4/config/ows/holder/notification-stream,/v4/config/ows/verifier/verification-status-stream,/v4/config/platform/admin/authentication/oidc/user/authenticator/sse

    Example:"/v4/config/ows/holder/notification-stream"

Response

application/json

The ticket.

  • ticketstring

    The one-time ticket. Put it in the ticket query parameter of the SSE operation of path.

    Example:"q3Jx0b7T8c2vY1nK5mW9pL4sR6uE0aZ2hD8fG3jC1tQ"

  • expiresIninteger

    Lifetime of the ticket in seconds.

    Example:30