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.
Scope
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. Before calling, confirm the following:
-
Authentication: Only the primary API Key is supported; temporary API Keys cannot be used (error code
403003).- Get the primary API Key: Get and configure an API Key.
-
Prerequisites: The World must belong to the current primary account and the Acting model, and its status must be
ready. Confirm via Query World Build Status. -
Caller: Called by your server; the resulting
ticketshould be delivered only to a client that is about to enter the room immediately.
HTTP request
Singapore
POST https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v2/apps/happyoyster-1.0-acting/openapi/v1/worlds/get-travel-credential
Replace {WorkspaceId} with your actual Workspace ID.
US (Virginia)
POST https://{WorkspaceId}.us-east-1.maas.aliyuncs.com/api/v2/apps/happyoyster-1.0-acting/openapi/v1/worlds/get-travel-credential
Replace {WorkspaceId} with your actual Workspace ID.
Request parameters | Get travel credential |
Content-Type Request content type. This parameter must be set to | |
Authorization API Key authentication. Only the primary API Key is supported; it starts with | |
Request Body | |
encryptedWorldId An Acting World ID under the current primary account with status |
Response parameters | Exchange succeeded |
code Return code. | |
message Error message. | |
data Response data. |
Prerequisite states and call notes
- The World must belong to the current primary account and the Acting model, and its status must be
ready. - The
ticketis valid for 1800 seconds and can be used successfully only once; obtain a new one after it expires or has been used. - The
ticketshould be delivered only to a client that is about to enter the room immediately, and should not be persisted as a long-term access credential. - Calling this endpoint does not create a Travel; the Travel is created when entering the room succeeds.
- The Acting feature gate mainly takes effect at creation and room entry; credential exchange still validates the World's corresponding quota, and
403007is returned when the quota has not been enabled.
Error codes
If the model call fails and returns an error, see HappyOyster Error Codes to resolve it.
Next steps
After obtaining the ticket:
- Enter Travel: the client uses the
ticketto create a Travel and obtain the RTC configuration.