The client uses the ticket to create an actual Travel and obtain the RTC join configuration and the Adventure capability version. maxExperienceTimeSec takes effect only in the Adventure model.
Scope
The client uses the ticket to create an actual Travel and obtain the RTC join configuration. maxExperienceTimeSec takes effect only in the Adventure model. Before calling, confirm the following:
- Authentication: The primary API Key is not required; the
ticketcompletes the enter-room validation. For how to obtain it, see Obtain authentication credentials. - Prerequisites: The
ticketis obtained from Get Travel Credential, unexpired and unused, and its World status isready. - Caller: Called by your client.
HTTP request
Singapore
POST https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v2/apps/happyoyster-1.0-adventure/openapi/v1/travels/enter-travel
Replace {WorkspaceId} with your actual Workspace ID.
China (Beijing)
POST https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v2/apps/happyoyster-1.0-adventure/openapi/v1/travels/enter-travel
Replace {WorkspaceId} with your actual Workspace ID.
US (Virginia)
POST https://{WorkspaceId}.us-east-1.maas.aliyuncs.com/api/v2/apps/happyoyster-1.0-adventure/openapi/v1/travels/enter-travel
Replace {WorkspaceId} with your actual Workspace ID.
Request parameters | Enter travel (client) |
Content-Type Request content type. This parameter must be set to | |
Authorization API Key authentication. The primary API Key is not required; either the primary or a temporary API Key can call it.
| |
Request Body | |
ticket An unexpired, unused single-use credential obtained from Get Travel Credential. Reusing the same | |
maxExperienceTimeSec Maximum experience duration, in seconds, must be a JSON integer. Defaults to
Strings and other numeric values are not accepted (e.g. |
Response parameters | Entered successfully |
code Return code. | |
message Error message. | |
data Response data. |
Prerequisite states and call notes
- The World corresponding to the
ticketmust beready, and the ticket must be unexpired and unused. - A successful call creates the Travel; reusing the same
ticketreturns401011. versionmust be handled aswanderV2; do not send control data using another model's interaction protocol.- The server ends the experience once
maxExperienceTimeSecis reached; the client should handle the terminal state that arrives afterward. - Adventure's direction, viewpoint, and action controls are not server-side HTTP Open APIs; the client must use the corresponding platform SDK's
sendCommand, which the SDK sends over the RTC DataChannel. rtcConfig=nullmeans there is currently no available streaming channel, and the client cannot start playback based on it.
Error codes
If the model call fails and returns an error, see HappyOyster Error Codes to resolve it.
Next steps
After entering the room successfully:
- Query Travel Status: poll every 2–5 seconds to read the available action pool.
- After the Travel becomes
running, the client sends direction, viewpoint, and action controls via the SDKsendCommand. - End Travel: end the session and handle the artifacts.