Major failure:httpstatus code:401 result:{code=124, message=Invalid access token.}

故障描述:

2023-05-25 14:13:50:152 左右系统更新了新的server-to-server token,详细信息如下:
accountId:jyhcMSzySBO9uGyXTp0g1A

生成的server-to-server token为:
eyJzdiI6IjAwMDAwMSIsImFsZyI6IkhTNTEyIiwidiI6IjIuMCIsImtpZCI6IjlmOTUwZjg3LTQ0ZjItNGYwOC05ZWUxLTg4ODNkNDJhZjhjYiJ9.eyJhdWQiOiJodHRwczovL29hdXRoLnpvb20udXMiLCJ1aWQiOiJJdE5iTjVDT1F6S2xnMV9EOXR0Y1d3IiwidmVyIjo5LCJhdWlkIjoiYzIxNjA5YWMyZTg5OTFjZjY2YzE0NDI0OWFkMzczZmQiLCJuYmYiOjE2ODQ5OTUyMjksImNvZGUiOiJMNlVtYmZtWFF1ZW5hS1hqelM1Z2h3SmFNUEc2eTBUOEgiLCJpc3MiOiJ6bTpjaWQ6STdEcE5ndFR6R0RJcEp2WGhrbWhnIiwiZ25vIjowLCJleHAiOjE2ODQ5OTg4MjksInR5cGUiOjMsImlhdCI6MTY4NDk5NTIyOSwiYWlkIjoianloY01TenlTQk85dUd5WFRwMGcxQSJ9.CiUV-e9qwtiTE1tBKc7ob9gfrS0qfdhW-R6Xw-8X2wpZ4NNAW79UVBEJCfZvMDjoenPb3Ek0yc0CM1fEhNFHCg

在2023-05-25 15:00:00左右,发现了大量创建会议失败的问题,报错信息为:httpstatus code:401
result:{code=124, message=Invalid access token.}。之后紧急切回原来的JWT后解决

以下是zendesk的回复:
Looking at the email, it shows that you may have been generating 4 tokens every hour which is the cause of the 124 invalid access token errors. If exceed the limit of 3 for generated tokens, it will trigger 124 invalid access token errors.

但是我们查看后台日志,发现并没有在1小时内申请多个token。我们的代码逻辑是1小时生成1个token。
请帮忙确认故障原因。谢谢。

anyone help?It seems a bug for server to server token?
thank you…

Hi @kaichen
Thanks for reaching out to us!
When you are working with Server to Server Oauth apps to generate access tokens, generating a new token, invalidates the previous one, even if that previous token has not expired yet.
Please, make sure that you are not using an invalid token when calling our APIs.
Thanks
Elisa

Thank you Elisa.
We checked our code and logic,it did not use the previous token.
On the other hand,we had transfered to the ‘server to server oauth’ from jwt for about 2 weeks before 2023-05-25 and no code changes happend on 2023-05-25.So the failure was odd.
Would you please have a look at the log at the error time?We have to know the real reason about this failure before we transfer from jwt to server to server oauth again.
Thank you for you and your collegues’ help!

Hi @kaichen
I have sent you a private message. could you reply there please

thank you .let me have a look.