Comments (7)
Fixed in e15e63b
Compatible with requests using JSON
and form data
in 90d4d44
from deeplx.
请注意 authkey 和 token 在 DeepLX 中不是一个东西!
在 DeepLX 中 authkey 是当免费的 API 用到 IP 被封之后,才会透过 authkey 使用官方的付费 API。所以 authkey 在大部分情况下不是必须的参数。
而 Bearer 中的 token 可以理解为 accesstoken 仅仅只是为了保护您公开的 API 不被滥用。
所以,在你没有设置 accesstoken 的情况下,可以直接无视 Authorization,请求 /v2/* 相关的 API。
from deeplx.
当然,我可以将 Authorization 用来验证 accesstoken,但是在这种情况下,会丢弃掉 authkey 的传递,如果频繁使用出现 429 之后,您将无法继续使用翻译服务。
我不确定用户更想要的是在和官方一致的 Authorization 中传递 authkey 还是 accesstoken。
from deeplx.
请注意 authkey 和 token 在 DeepLX 中不是一个东西!
我明白这一点,我部署服务时设置的是 token,我的 authkey 已经被官方封掉了。。。我觉得,大部分需要 DeepLX 服务的用户应该都是没办法通过正规渠道获取官方 authkey 😥
from deeplx.
请注意 authkey 和 token 在 DeepLX 中不是一个东西!
我明白这一点,我部署服务时设置的是 token,我的 authkey 已经被官方封掉了。。。我觉得,大部分需要 DeepLX 服务的用户应该都是没办法通过正规渠道获取官方 authkey 😥
OK,晚些时候我改下代码,支持对 accesstoken 的验证。
from deeplx.
我不确定用户更想要的是在和官方一致的 Authorization 中传递 authkey 还是 accesstoken。
如果是考虑到这一点,那我觉得可以通过判断 Authorization 的值来决定,因为官方的 key 都是以 :fx 结尾。
另外,也可以在 DeepLX 部署文档中说明一下这一点,提示用户不要将 token 设置的和官方 auth_key 格式一样,避免问题。
from deeplx.
Great ❤️
from deeplx.
Related Issues (20)
- Win10一打开就闪退, 把能关的都关了也无法解决问题, 用ProcessMonitor记录了下崩溃过程 HOT 22
- 沉浸翻译偶尔报错:Unexpected end of JSON input HOT 1
- the response data is blank HOT 1
- v2/translate 接口似乎没有校验 token HOT 1
- Ability to provide auth keys within file HOT 4
- Multiple line translation HOT 14
- 临时解决时区问题
- 请求添加对树莓派ARM的二进制程序 HOT 5
- can i use my premium session? HOT 3
- 功能建议:术语表
- 批量翻译返回格式和官方不一致 HOT 2
- 是否可用添加ipv6的代理池
- DeeplX doest work? HOT 3
- How to pass below parameters to avoid block? identifier, timestamp HOT 1
- DeepL with immersive-translate Token HOT 2
- [报错] HOT 3
- [error]: 5次重试后依然出错:response.text='',Expecting value: line 1 column 1 (char 0) HOT 1
- 更改端口后原端口并未关闭,而是开启了两个端口,如何将default端口关闭 HOT 3
- 支持 DeepL 官方 API 接口响应格式 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deeplx.