You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I craft the URL to be what I would expect the Translations.UpdateArticleTranslation(() method to use (see example below), and past into my browser, I see a lovely JSON response
Hi
About three weeks ago the following line of code is throwing an error:
GroupTranslationResponse translations = _helpCntrApi.Translations.ListTranslationsForArticle(articleID);
The error is as follows (minus organisation specific details):
The code above the error seem to be working OK.
We are declaring global variables as the top of our class:
private const string _zenLocale = "en-nz";
private ZendeskApi _zenApi = null;
private IHelpCenterApi _helpCntrApi = null;
Instantiating the objects with the constructor:
_zenApi = new ZendeskApi(zenUrl, zenLogin, zenToken, _zenLocale);
_helpCntrApi = _zenApi.HelpCenter;
We do the stuff specific to our organisation, before get the article ID and then run the code that errors...
Int64 articleID = (long)article.Id;
GroupTranslationResponse translations = _helpCntrApi.Translations.ListTranslationsForArticle(articleID);
foreach (Translation translation in translations.Translations)
{
translation.Body = contents;
_helpCntrApi.Translations.UpdateArticleTranslation(translation);
}
If I craft the URL to be what I would expect the Translations.UpdateArticleTranslation(() method to use (see example below), and past into my browser, I see a lovely JSON response
Here is the JSON example:
{"translations":[{"id":6800087654321,"url":"https://ORGANISATION.zendesk.com/api/v2/help_center/articles/6800012345678/translations/en-nz","html_url":"https://customersuccess.ORGANISATION.com/hc/en-nz/articles/6800012345678","source_id":6800012345678,"source_type":"Article","locale":"en-nz","title":"Our Application Title","body":"\u003cbody\u003e\r\n\r\n\t\r\n\t\t\u003cmeta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"
...
,"page":1,"previous_page":null,"next_page":null,"per_page":100,"page_count":1,"count":1}
The text was updated successfully, but these errors were encountered: