From ea40a0756f6677af59341607cad34224045521a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8B=E3=81=A3=E3=81=93=E3=81=8B=E3=82=8A?= <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Mon, 24 Nov 2025 10:59:50 +0900 Subject: [PATCH] =?UTF-8?q?fix(backend):=20DeepL=E7=BF=BB=E8=A8=B3?= =?UTF-8?q?=E3=81=AEAPI=E3=82=AD=E3=83=BC=E6=8C=87=E5=AE=9A=E6=96=B9?= =?UTF-8?q?=E5=BC=8F=E5=A4=89=E6=9B=B4=E3=81=AB=E5=AF=BE=E5=BF=9C=20(#1683?= =?UTF-8?q?9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * spec: DeepL Deprecation of query parameter and request body authentication (MisskeyIO#1096) https://developers.deepl.com/docs/resources/breaking-changes-change-notices/november-2025-deprecation-of-legacy-auth-methods * Update Changelog * Update Changelog * :v: [ci skip] --------- Co-authored-by: あわわわとーにゅ <17376330+u1-liquid@users.noreply.github.com> --- CHANGELOG.md | 3 +++ packages/backend/src/server/api/endpoints/notes/translate.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef1a81a173..ca24639e97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,9 @@ ### Server - Enhance: `clips/my-favorites` APIがページネーションに対応しました +- Fix: DeepL APIのAPIキー指定方式変更に対応 + (Cherry-picked from https://github.com/MisskeyIO/misskey/pull/1096) + - 内部実装の変更にて対応可能な更新です。Misskey側の設定方法に変更はありません。 ## 2025.11.0 diff --git a/packages/backend/src/server/api/endpoints/notes/translate.ts b/packages/backend/src/server/api/endpoints/notes/translate.ts index e9a6a36b02..cd7d46007c 100644 --- a/packages/backend/src/server/api/endpoints/notes/translate.ts +++ b/packages/backend/src/server/api/endpoints/notes/translate.ts @@ -95,7 +95,6 @@ export default class extends Endpoint { // eslint- if (targetLang.includes('-')) targetLang = targetLang.split('-')[0]; const params = new URLSearchParams(); - params.append('auth_key', this.serverSettings.deeplAuthKey); params.append('text', note.text); params.append('target_lang', targetLang); @@ -104,6 +103,7 @@ export default class extends Endpoint { // eslint- const res = await this.httpRequestService.send(endpoint, { method: 'POST', headers: { + 'Authorization': `DeepL-Auth-Key ${this.serverSettings.deeplAuthKey}`, 'Content-Type': 'application/x-www-form-urlencoded', Accept: 'application/json, */*', },