带访问令牌的 pushbullet curl 不起作用

问题描述

我在 https://www.pushbullet.com/#settings/account 生成一个访问令牌,但它似乎不起作用:

$ curl --http1.1 --header "Access Token: $PUSHBULLET_API_TOKEN"  https://api.pushbullet.com/v2/users/me | jq .
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   176  100   176    0     0   1093      0 --:--:-- --:--:-- --:--:--  1086
{
  "error": {
    "code": "invalid_access_token","type": "invalid_request","message": "Access token is missing or invalid.","cat": "(=^・ω・^)y="
  },"error_code": "invalid_access_token"
}

对可能出现的问题有什么建议吗?与 API 文档中示例的唯一偏差是 http1.1 选项,我添加了该选项,因为 http2.0 支持似乎已损坏:

$ curl --header "Access Token: $PUSHBULLET_API_TOKEN"  https://api.pushbullet.com/v2/users/me  | jq .
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0  1555    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (92) HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)