生成OAuth 2 SASL字符串时出现错误代码400 [英] Error code 400 on generating OAuth 2 SASL string
问题描述
我为OAuth 2生成了以下SASL字符串:
I have generated the following SASL string FOR OAuth 2:
user=designadmin@mydesign.mygbiz.com^Aauth=Bearer ya29.AHES6ZTtYOu0NR0vAYbrvKZNcHJPuZEpr4Hk3W3dXcXFQ88 ^ A ^ A
user=designadmin@mydesign.mygbiz.com^Aauth=Bearer ya29.AHES6ZTtYOu0NR0vAYbrvKZNcHJPuZEpr4Hk3W3dXcXFQ88^A^A
然后我对其进行编码,并发送编码后的字符串,如下所示:
Then i encoded it and sent the encoded string like this:
MSB AUTHENTICATE XOAUTH2 编码的字符串
但是我得到如下错误响应:
But i get error response as:
{状态":"400",方案":承载者",范围":" https: //mail.google.com/}
此错误是什么意思,我该如何纠正?
What does this error mean and how can i correct it?
推荐答案
我终于知道了.就我而言,Gmail范围(" https://mail.google.com/")丢失了,来自令牌生成过程.现在工作正常.
I finally figured it out. In my case, the Gmail scope("https://mail.google.com/") was missing, from the token generation process. It works fine now.
这篇关于生成OAuth 2 SASL字符串时出现错误代码400的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!