【问题标题】:Unable to get refresh_token from vimeo ouath无法从 vimeo oauth 获取刷新令牌
【发布时间】:2020-08-20 11:36:03
【问题描述】:

根据标准 ouath2.0 授权授权代码发光。查询中收到的代码可用于获取 access_token 和 refresh_token。

但我无法从 vimeo 获取 refresh_token。以下 curl 仅提供 access_token

  curl 'https://api.vimeo.com/oauth/access_token' \
      -H 'Accept: application/json, text/plain, */*' \
      -H 'Referer: http://localhost:4200/vimeoCallback?code=0772xxxxsomeCode0003f7d818e207b' \
      -H 'Authorization: Basic YTMtxxxbasicbase64(KEY:ID)XXXXUg==' \
      -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36' \
      -H 'Content-Type: application/json' \
      --data-binary '{"grant_type":"authorization_code","code":"0772xxxxsomeCode0003f7d818e207b","redirect_uri":"http://localhost:4200/vimeoCallback"}' \
    

请建议我获取 refresh_token 需要什么

【问题讨论】:

    标签: oauth-2.0 vimeo vimeo-api refresh-token


    【解决方案1】:

    您的消息参数看起来不错 - 您只需要将它们作为表单编码数据而不是 JSON 发送 - 有关语法,请参阅 this link

    【讨论】:

    • 谢谢加里。所以你建议而不是'Content-Type:application / json'它应该被formencoded......然后我也会得到refresh_token......?
    • 能否确认您之前在 vimeo 中检索过 refresh_token ?
    • 不在 Vimeo 中 - 但 OAuth 标准消息是表单 url 编码的,所以 Vimeo 很可能使用它。
    • 是的,但如果是这样的话......我不会得到 access_token ......目前我正在得到 access_token , scope , expire 等......但不是 refresh_token
    • 是的 - 看起来你是对的,并且使用了 non standard format,而不是预期的 standard format 安全库。我根本看不到任何刷新令牌功能,this post 建议访问令牌不会过期。
    猜你喜欢
    • 2021-01-18
    • 1970-01-01
    • 2016-07-10
    • 2019-05-02
    • 2013-11-05
    • 2022-12-14
    • 1970-01-01
    • 2015-10-11
    • 2018-06-17
    相关资源
    最近更新 更多