Prepare Accounts
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:
-
Gateway layer — Alibaba Cloud AccessKey validates the caller identity and grants API access.
-
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.
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.
-
Obtain the AccessKey
Sign in to the Alibaba Cloud console and create or view an AccessKey on the AccessKey management page.
WarningAn AccessKey has full permissions of the account. It is recommended to use a RAM user's AccessKey and follow the principle of least privilege.
-
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.
-
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.
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.
-
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.
-
Grant permissions to the RAM user
Grant the
AliyunRealTranslationAgentOperatorAccesspolicy to the RAM user. This policy covers all translation-related API permissions. -
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.
NoteThe API Key is bound to the member's business identity. Keep it safe and do not share it with others.
-
Pass the API Key in requests
When calling OpenAPI, pass the API Key through the
APIKeyfield 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. |