Connector Workflows
The following diagrams show how commonly used API methods work together as part of the translation management process:
To obtain access token, send the following POST request to endpoint https://login.lionbridge.com/connect/token
curl --location --request POST 'https://login.lionbridge.com/connect/token' --header 'Content-Type: application/x-www-form-urlencoded' --data-urlencode 'grant_type=client_credentials' --data-urlencode 'client_id=xxx' --data-urlencode 'client_secret=XXXXXXXX'
This returns an access token with expiry:
{"access_token":"<encoded token>","expires_in":3600,"token_type":"Bearer","scope":"contentapi.contentv2.prod.default"}
Connectors can then use that token to access ContentAPIv2 by including it in the header
curl -X GET "https://<contentapi-address>/providers" -H "accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer <encoded token>"
This token has an expiry, typically set to 1 hour (3600s). Once expired, the token is invalid and the user would be required to obtain a new token using the client id and secret. The recommendation for users is to obtain the token, and reuse it during future calls until it expires. This avoids unnecessary exposure of the client secret.
See https://auth0.com/docs/flows/client-credentials-flow for more information about client credential flow.
Note: if as early clients of Content API v2 Staging environment you had been given temporary access token, you should switch to the client credential workflow and use client id and secret to obtain access token. The temporary access token you got do not work in Content API production environment, and will stop working in staging environment in near future. Please contact Lionbridge support if you have not received client id and secret to replace your temporary access token.
Note: you can mix file-based and KVP-based content for translation in a single job.