Prepare Accounts

Updated at:
Copy as MD

Real Translation Buddy OpenAPI uses a two-layer authentication mechanism. Prepare the corresponding credentials before making calls.

Authentication mechanism

Every OpenAPI request goes through two layers of validation:

  1. Gateway layer — Alibaba Cloud AccessKey validates the caller identity and grants API access.

  2. Application layer — Real Translation Buddy resolves the business identity based on the caller type, and determines the ownership and billing subject of the translation task.

Note

After the gateway layer passes, the application layer additionally validates whether the business identity has a valid seat bound. Calls without a bound seat or with insufficient Credits are still rejected.

Alibaba Cloud account

The Alibaba Cloud account (Owner) authenticates with an AccessKey ID and AccessKey Secret.

  1. Obtain the AccessKey

    Sign in to the Alibaba Cloud console and create or view an AccessKey on the AccessKey management page.

    Warning

    An AccessKey has full permissions of the account. It is recommended to use a RAM user's AccessKey and follow the principle of least privilege.

  2. Confirm identity binding

    The first time the Alibaba Cloud account uses Real Translation Buddy, the system binds the business identity and initializes an organization if none exists. Make sure the Alibaba Cloud account has signed in to the Real Translation Buddy console at least once to complete initialization.

  3. Start calling

    Configure the AccessKey ID and AccessKey Secret in the SDK to call OpenAPI directly. No additional API Key is required.

Member account

Member accounts call OpenAPI via Alibaba Cloud RAM users. In addition to the AccessKey, an API Key must also be passed to identify the business identity.

Note

AliyunRealTranslationAgentOperatorAccess on this page is used to call OpenAPI. AliyunRealTranslationAgentFullAccess is used to access the Real Translation Buddy console. For console authorization, see Access the Real Translation Buddy Console as a RAM User.

  1. Create a RAM user and obtain an AccessKey

    Create a RAM user in the Alibaba Cloud RAM console, enable OpenAPI access, and obtain an AccessKey.

  2. Grant permissions to the RAM user

    Grant the AliyunRealTranslationAgentOperatorAccess policy to the RAM user. This policy covers all translation-related API permissions.

  3. Obtain the API Key

    The member signs in to the Real Translation Buddy workbench and obtains the API Key from personal settings. The API Key is used to resolve the business identity at the application layer.

    Note

    The API Key is bound to the member's business identity. Keep it safe and do not share it with others.

  4. Pass the API Key in requests

    When calling OpenAPI, pass the API Key through the APIKey field in the request:

    request.setAPIKey("sk-your-api-key");

Authentication comparison

Caller

Gateway credential

Application credential

Notes

Alibaba Cloud account

AccessKey ID + AccessKey Secret

Automatically resolved

The system resolves the business identity via the Alibaba Cloud account binding.

Member (RAM user)

AccessKey ID + AccessKey Secret

API Key

The API Key must be passed in every request.