0

我正在调用 API 以在 RingCentral 上刷新我的访问令牌,但它会引发以下错误

{
    "error":"invalid_request",
    "error_description":"Unsupported grant type",
    "errors":[
        {
            "errorCode":"OAU-250",
            "message":"Unsupported grant type"
        }
    ]
}

谁能帮我吗?

4

3 回答 3

0

我正在使用RingCentral GitHub提供的 RingCentral API

以下是身份验证请求的示例:

var request = new Request("/restapi/oauth/token",
new Dictionary<string, string> {
    { "grant_type", "authorization_code" },
    { "redirect_uri", redirectUri },
    { "code", authCode },
    { "refresh_token_ttl", "604800" } });
于 2016-11-28T14:23:34.830 回答
0

检查并查看您是否正在发布grant_type表单字段并且它是否设置为refresh_token

于 2016-09-19T19:02:48.953 回答
0

grant_type=refresh_token服务器/机器人平台类型外,所有平台类型都支持。确保您尚未使用该平台类型创建您的应用程序。

refresh_token 的参数与 grant_type 密码几乎相同,只是稍作更改。

网址将相同:https ://platform.devtest.ringcentral.com/restapi/oauth/token

标题:

"Accept":"application/json“
"Content-Type":"application/x-www-form-urlencoded“
"Authorization",:"Basic <ClientID:ClientSecret in base 64> 

身体:

在正文中,我们需要通过以下方式传递参数:

username=<account phone number>&password=<account password>&extension=<your extension>&grant_type=refresh_token&refresh_token=<the refresh token generated>
于 2019-06-19T22:04:41.647 回答