• Show convenient version of this site
  • Deutsch
  • English
Contact
Newsletter
  • Products
    • ALS
      • Across Language Server
        • Translation Management
        • Terminology Management
        • Translation Memory
      • Editions
      • Interfaces
    • ATE
      • Across Translator Edition
      • Editions
      • Download
      • Across Account
    • Elanion
      • Overview
      • Login
    • AcrossMT
      • AcrossMT
  • Solutions
    • Customers
      • Enterprises
      • Language Service Providers
      • Translators
    • Industries
      • E-Commerce & Trade
      • Pharmaceuticals & medicine
      • IT & Software
    • Departments
      • Marketing & E-Commerce
      • Technical Documentation
      • Software User Interfaces
  • Services
    • Hosting
    • Training
    • Consulting
  • Partners
    • Language Service Providers
    • Universities
  • Company
    • Across Systems
    • News
    • Events
    • Career
    • Contact
  • Knowledge
    • Blog
    • Video Library
    • Case Studies
    • White Papers
    • Fact Sheets
    • File Formats
    • Expert Features
  • Support
    • New Functions
    • Online Help
    • FAQ
    • Support Request
    • Updates
Schedule Consultation

C# Example

The following example shows an API usage basis developed on C#.

  1. Proceed as follows to make use of and reproduce the example:
  2. Download the example file from here and extract it to a separate folder.
  3. Open the App.config file included in the example and adjust it as follows:
    1. Change the ServerContextGuid to the local server context GUID (it is equal to the installation GUID).
    2. Change AcrossIdentityServerUrl to the address of your Across Identity Server.
    3. Change CrossTankAPIUrl to the address of your crossTank API.
    4. Adjust CrossTankAPIClientId to the configured client ID from appsettings.json.
    5. Adjust UserName to the required user name.
    6. Adjust UserPassword to the required user password.
    7. Save the file.
  4. Adjust the appsettings.json file as follows (see also Authentication basics):
    "Clients": [ 
      { 
        "ClientName": "CrossTank API Tests", 
        "ClientId": "CrossTankAPI.Tests", 
        "AlwaysIncludeUserClaimsInIdToken": "true", 
        "AllowAccessTokensViaBrowser": "true", 
        "AllowedScopes": [ 
          "openid", 
          "profile", 
          "email", 
          "rights", 
          "crosstank.api.readonly", 
          "crosstank.api.writeonly" 
        ], 
        "RemoveNonLicensedApiScopes": [ 
          "crosstank.api.writeonly" 
        ], 
        "RequireClientSecret": "false", 
        "AllowedGrantTypes": [ 
          "password" 
        ] 
      } 
    ],
  5. Open the ApiExample.sln file in Microsoft Visual Studio 2017 or later and compile it.
Register for our Newsletter now

Our newsletter provides you with exclusive news about the Across Language Server, often even before the official announcement. The newsletter also provides you with early information on events, webinars, and training sessions.

  • Legal Notice
  • GTC
  • Privacy Statement
  • Cookies
  • info@across.net