V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
mornlight
V2EX  ›  V2EX API

tokens api 有点小问题

  •  
  •   mornlight ·
    bynil · 2021-11-07 21:10:32 +08:00 · 1719 次点击
    这是一个创建于 872 天前的主题,其中的信息可能已经有所发展或是发生改变。

    https://www.v2ex.com/help/api 文档里提到:

    expiration - 可支持的值:259200 ,5184000 或者 15552000 ,即 30 天,60 天或者 180 天的秒数
    完整例子:
    
    POST https://www.v2ex.com/api/v2/tokens
    Authorization: Bearer bd1f2c67-cc7f-48e3-a48a-e5b88b427146
    {"scope": "everything", "expiration": 259200}
    

    这个示例有偏差,30 天的秒数是 2592000 。

    另外,实测传入 5184000 会返回错误:Invalid expiration provided

    3 条回复    2021-11-09 17:17:18 +08:00
    mornlight
        1
    mornlight  
    OP
       2021-11-09 16:57:07 +08:00   ❤️ 1
    Livid
        2
    Livid  
    MOD
       2021-11-09 16:59:43 +08:00
    @mornlight 收到。马上检查这里的实现。
    Livid
        3
    Livid  
    MOD
       2021-11-09 17:17:18 +08:00   ❤️ 1
    @mornlight 修复已经部署。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   986 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 20:13 · PVG 04:13 · LAX 13:13 · JFK 16:13
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.