Authentication

OAuth

Note

The user for the has to be, registered by Content Hub, too.

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

Request:

> curl --user 'ApplicationClientId:ApplicationSecret' \
    -d "grant_type=password" \
    -d "username=SamanthaNewman" \
    -d "password=MySecretPassword" \
    https://oauth.24t.net/oauth/token

Response:

{
  "access_token": "ab935877-1ac9-44ea-b537-6a66b305270e",
  "token_type": "bearer",
  "expires_in": 42982,
  "scope":" read write"
}

How to use an OAuth token using cURL

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