我在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)