문제

I am trying to use the PushBullet API but I am having some problems with it authenticating my API Key mainly because I am not sure how to properly make a POST to the API.

I tried researching online but I couldn't find what -u means. Does this mean it should go in the header or apart of the data?

curl https://api.pushbullet.com/api/pushes \
      -u API_KEY: \
      -d device_iden=u1qSJddxeKwOGuGW \
      -d type=note \
      -d title=Title \
      -d body=Body \
      -X POST

I tried to do a Postman like so (I blocked out where the key and device go): enter image description here

What am I doing wrong?

도움이 되었습니까?

해결책

I figured it out I needed to add Authorization to the header. Then in the header I used the key as the username. All working now!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top