Create an ephemeral Viewer session
EphemeralSessionCreateResponse viewer().ephemeralSessions().create(EphemeralSessionCreateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/v1/viewer/ephemeral-sessions
Mints a 30-second tokenized landing URL for a userless, studyless Viewer session. The token names a customer retrievalId (not an Avara study). Optional options are echoed verbatim on ephemeral.access_requested (max 3072 bytes JSON). Optional hangingProtocol applies a single-monitor layout when the viewer loads. Requires a customer study webhook on the API key.
Create an ephemeral Viewer session
package com.avarasoftware.example;
import com.avarasoftware.client.AvaraClient;
import com.avarasoftware.client.okhttp.AvaraOkHttpClient;
import com.avarasoftware.models.viewer.ephemeralsessions.EphemeralSessionCreateParams;
import com.avarasoftware.models.viewer.ephemeralsessions.EphemeralSessionCreateResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
AvaraClient client = AvaraOkHttpClient.fromEnv();
EphemeralSessionCreateParams params = EphemeralSessionCreateParams.builder()
.retrievalId("order-12345")
.build();
EphemeralSessionCreateResponse ephemeralSession = client.viewer().ephemeralSessions().create(params);
}
}{
"url": "https://viewer.avarasoftware.com/token/landing?token=abc123"
}Returns Examples
{
"url": "https://viewer.avarasoftware.com/token/landing?token=abc123"
}