Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API获取调用凭证报错[bug?] #220

Open
yxjsxl opened this issue Jul 22, 2024 · 1 comment
Open

API获取调用凭证报错[bug?] #220

yxjsxl opened this issue Jul 22, 2024 · 1 comment

Comments

@yxjsxl
Copy link

yxjsxl commented Jul 22, 2024

API获取调用凭证报错:internal err
完整返回的是{'code': 100002, 'message': 'internal err'}
编程环境:python
data={
'appId':'正确的',
'clientSecret':'正确的'
}
hd={'Content-Type':'application/json'}
ATK_now = requests.post(url="https://bots.qq.com/app/getAppAccessToken",data=data,headers=hd)

@aJarOfCode
Copy link

aJarOfCode commented Aug 2, 2024

我也遇到同样的错误,问题似乎并不出在本地。似乎每次请求都会向https://bots.qq.com/app/getAppAccessToken 获取access_token,如果请求超时,捕获asyncio.TimeoutError异常,并打印超时信息。如果响应数据中没有access_token或expires_in字段,打印错误信息并抛出RuntimeError异常。显然我们遇到了第二种情况。当成功之后才会返回机器人的token。我目前还没找出解决办法。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants