Skip to main content
Directing

HappyOyster-Directing-Get Travel Credential API Reference

A third-party server uses the primary API Key to exchange for a short-lived, single-use ticket, then securely delivers it to the client. This endpoint only validates World ownership, status, and quota; it does not create a Travel.

POST
/api/v2/apps/happyoyster-1.0-directing/openapi/v1/worlds/get-travel-credential
cURL - Get travel credential
curl --location 'https://dashscope-intl.aliyuncs.com/api/v2/apps/happyoyster-1.0-directing/openapi/v1/worlds/get-travel-credential' \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "encryptedWorldId": "{encryptedWorldId}"
}'
{
  "code": 0,
  "message": null,
  "data": {
    "ticket": "tk_a1b2****",
    "expiresIn": 1800,
    "encryptedWorldId": "enc_a1b2****"
  }
}

Scope

  • Only the primary API Key is supported; temporary API Keys cannot be used (error code 403003).
  • The World must belong to the current primary account and the Directing model, and its status must be ready.
  • This endpoint does not create a Travel; the Travel is created when entering the room succeeds.
If the model call fails and returns an error, see HappyOyster Error Codes to resolve it.

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. Only the primary API Key is supported; it starts with sk-, e.g. sk-xxx. It is typically configured as the environment variable $DASHSCOPE_API_KEY. A temporary API Key (starting with st-) returns 403003.

Body

application/json
string
required

A Directing World ID under the current primary account with status ready.

Response

200-application/json
integer
string
object