Skip to main content
Adventure

HappyOyster-Adventure-Enter Travel API Reference

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.

POST
/api/v2/apps/happyoyster-1.0-adventure/openapi/v1/travels/enter-travel
cURL - Enter travel (client)
curl --location 'https://dashscope-intl.aliyuncs.com/api/v2/apps/happyoyster-1.0-adventure/openapi/v1/travels/enter-travel' \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "ticket": "{ticket}",
  "maxExperienceTimeSec": 90
}'
{
  "code": 0,
  "message": null,
  "data": {
    "encryptedTravelId": "trvl_a1b2****",
    "encryptedWorldId": "enc_a1b2****",
    "mode": 1,
    "creationModel": "simple",
    "playUrl": null,
    "firstFrame": "https://cdn.happyoyster.com/frames/world_xyz789.jpg",
    "rtcConfig": {
      "channelId": "stream_abc123",
      "appId": "18bca2e3218c46aebf8ff3a32fb12311",
      "token": "007eJxTYOh...",
      "userId": "user_1"
    },
    "version": "wanderV2",
    "aspectRatio": null,
    "noStreamAutoEndTimeoutSec": 30,
    "maxExperienceTimeSec": 90
  }
}

Scope

The client uses the ticket to create an actual Travel and obtain the RTC join configuration. Before calling, confirm the following:
  • The primary API Key is not required; the ticket completes the enter-room validation.
  • The ticket is obtained from Get Travel Credential, unexpired and unused, and its World status is ready.
  • Called by your client.
If the model call fails and returns an error, see HappyOyster Error Codes.

Authorizations

string
header
required

QwenCloud API Key. Only the primary API Key (sk- prefix) is supported. See Get an API Key.

Header Parameters

string
default"application/json"
required

Request content type. This parameter must be set to application/json.

string
required

API Key authentication. The primary API Key is not required; either the primary or a temporary API Key can call it. Primary API Key: starts with sk-, e.g. sk-xxx. Temporary API Key: starts with st-, e.g. st-xxx.

Body

application/json
string
required

An unexpired, unused single-use credential obtained from Get Travel Credential. Reusing the same ticket returns 401011.

enum<integer>
default60

Maximum experience duration, in seconds, must be a JSON integer. Defaults to 60. Allowed values: 60, 90, 120. Strings and other numeric values are not accepted (e.g. "60" is not valid); an invalid tier returns 400000. The server automatically ends the Travel once this duration is reached.

60,90,120

Response

200-application/json
integer

Return code. 0 means success; non-zero is an error code.

string

Error message. null on success.

object

Response data. null on failure.

HappyOyster-Adventure-Enter Travel API Reference - QwenCloud