Hi,
I'm using the desktop Studio API in a 3rd party application, and I can't make the deepl plugin work. I'm using Studio 2024 with deepl plugin 7.0.9.1 (but also reproducible with 2022 versions as well).
The plugin is installed, we have the API key, it does work in desktop studio UI, segments are translated.
Using the desktop API (on the same project - so provider options are properly configured), I try to run a pretranslate task on a project like this:
sdlProject.Credentials.AddCredential(new Uri("deepltranslationprovider:///"), APIKEY);
....
var result = sdlProject.RunAutomaticTasks(projectFiles.ToArray(), sdlTaskTemplateIds);
But I keep getting the response:
System.Net.Http.HttpRequestException: Response status code does not indicate success: 403 (Forbidden).\r\n at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()\r\n at Sdl.Community.DeepLMTProvider.Client.DeepLTranslationProviderClient.GetSupportedLanguages(String type, String apiKey)
Indeed, if I debug into the code, then I see that the API key is not available. By the time the provider is created, it receives a credential store that is empty:
Because the credential store (used by the deepl plugin) seems to be created like this (Sdl.ProjectApi.Implementation.Sdl.ProjectApi.Implementation):
which is different from the publicly available credential store of the project.
As you can see on the upper picture, the deepl plugin tries to use the ApiKey of the options object as fallback, but the ApiKey is marked with JsonIgnore, so it cannot be provided through the translation provider state either.
Can you please help how I can solve this?
thanks!
Tamas
Generated Image Alt-Text
[edited by: RWS Community AI at 6:23 AM (GMT 1) on 29 Jul 2025]