pushbullet curl w/ access token doesn't work

160 Views Asked by At

I generated an access token at https://www.pushbullet.com/#settings/account but it doesn't seem to work:

$ 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"
}

Any suggestions for what might be going wrong? The only deviation from the example in the API docs is the http1.1 option, which i added because http2.0 support seems broken:

$ 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)
0

There are 0 best solutions below