The API 2 endpoint is your Wordbee Translator URL + /api Please make sure to use the endpoint that applies to your platform throughout this documentation. Read more |
API methods currently use a token based mechanism. |
All the API methods currently use a token based mechanism.
To use the API, the user first has to obtain a token. Submit the following call with your Account Id and an API Key:
POST https://www.wordbee-translator.com/api/auth/token BODY (json): {"accountid": "{your account id}", "key": "{your API key}"} => returns token (string) |
Note: Each API Key is linked to a specific user. The token thus allows access to exactly the same data which the user can access online (see user's access rights and profile).
With all API methods you must include the HTTP header below and fill in the token:
X-Auth-Token {your token} X-Auth-AccountId {your account id} |
Example:
X-Auth-Token 61094C3A-F44F-4D5C-AD34-1D5185EFFE94 X-Auth-AccountId supertrans |
It is recommended to invalidate your token when you are done with calling the API methods:
DELETE https://www.wordbee-translator.com/api/auth/token |
In the HTTP header include:
X-Auth-Token {your token} X-Auth-AccountId {your account id} |
Note: A token automatically expires after a period of inactivity of 30 minutes.
var client = new RestClient("{{API2URL}}"); client.Timeout = -1; var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{"accountid": "{{PLATFORMID}}", "key": "{{API2KEY}}"}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content); |