Authentication

Authentication required

All requests have to be authenticated with an OAuth token. A request without authentication will respond with a 401 Unauthorized status.

How to get an OAuth token using cURL

Example Request:

> curl \
    -d "grant_type=password" \
    -d "client_id=api"
    -d "client_secret=234nf94-67k5-gt5g-4rt5-rt6d47590384"
    -d "username=SamanthaNewman" \
    -d "password=MySecretPassword" \
      https://accounts.24translate.de/auth/realms/contenthub/protocol/openid-connect/token

Typo3

If you use the API with a TYPO3 installation, this Header 'Content-Type: application/x-www-form-urlencoded' needs to be set

Example Response:

{
  "access_token": "Rmj6d7lGuigonH8Q...",
  "expires_in": 299,
  "refresh_expires_in": 7199,
  "refresh_token": "nyyxCRJKseD-I1tg...",
  "not-before-policy": 1536135932,
  "session_state": "59f06845-ed9f-4f93-b7f8-fb86e64e6db4",
  "token_type": "bearer"
}

How to use an OAuth token using cURL

Example Request:

> curl https://api.contenthub.24technology.de/rest/api/translationTasks \
    --header "Authorization:bearer ab935877-1ac9-44ea-b537-6a66b305270e"