Authentication & environments¶
Auth is a bearer token. You get an API key from Eurotext and send it on every request:
There's no login call, no token exchange, no expiry dance — the key goes on the header and that's the whole story.
Environments¶
There are two, with identical payloads. Develop against stage, flip the base URL for production.
| Environment | Base URL |
|---|---|
| Stage | https://stage.api.eurotext.de/api/v2 |
| Production | https://api.eurotext.de/api/v2 |
Every path in these docs is relative to that base, e.g. POST /project means
POST https://stage.api.eurotext.de/api/v2/project.
Checking the key works¶
There's no dedicated "ping" endpoint, but GET /info/languages is cheap, needs a
valid key, and returns a useful payload. It's what the client uses as a health
check:
$client = new EurotextClient($apiKey); // stage
$languages = $client->getLanguages(); // 401 here means the key is wrong
curl -s https://stage.api.eurotext.de/api/v2/info/languages \
-H "Authorization: Bearer $EUROTEXT_API_KEY"
A 401 means the key is wrong or for the wrong environment. Anything 2xx means
you're good.
Keeping the key out of your code¶
Don't hardcode it. Environment variable, secrets manager, Symfony parameters from
.env.local — whatever your stack already uses. The example script reads
EUROTEXT_API_KEY from the environment.