Error code 400 on generating OAuth 2 SASL string

瘦欲@ 提交于 2019-12-30 12:13:29

问题


I have generated the following SASL string FOR OAuth 2:

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 encoded string

But i get error response as:

{"status":"400","schemes":"Bearer","scope":"https://mail.google.com/"}

What does this error mean and how can i correct it?


回答1:


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.




回答2:


+1 to akshay for self answering.

This can also happen if you are using an expired token. If that is the case, just re authenticate your user and use the new token.



来源:https://stackoverflow.com/questions/17700114/error-code-400-on-generating-oauth-2-sasl-string

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!